diff options
Diffstat (limited to 'nse_lpeg.cc')
-rw-r--r-- | nse_lpeg.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/nse_lpeg.cc b/nse_lpeg.cc new file mode 100644 index 0000000..ec7b6c4 --- /dev/null +++ b/nse_lpeg.cc @@ -0,0 +1,21 @@ +#include "nse_lua.h" + +/* Lua 5.3 support */ +#define luaL_checkint luaL_checkinteger + +#undef lua_equal +#define lua_equal(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPEQ) + +#undef lua_getfenv +#define lua_getfenv lua_getuservalue +#undef lua_setfenv +#define lua_setfenv lua_setuservalue + +#undef lua_objlen +#define lua_objlen lua_rawlen + +#undef luaL_register +#define luaL_register(L,n,f) \ + { if ((n) == NULL) luaL_setfuncs(L,f,0); else luaL_newlib(L,f); } + +#include "lpeg.c" |