Define streq macro in util.h and use it over strcmp in lprocess.c

This commit is contained in:
Jeremy Baxter 2023-07-01 09:53:43 +12:00
parent bcdb57b4dd
commit d1c7b71043
2 changed files with 3 additions and 1 deletions

2
util.h
View file

@ -1,7 +1,9 @@
#include <string.h>
#include <lua.h>
#define LFAIL_RET 2
#define streq(s1, s2) (strcmp((s1), (s2)) == 0)
#define newoverride(L, lib, libname) \
lua_getglobal(L, libname); \
for (int i = 0; lib[i].name != NULL; i++) { \