mirror of
https://github.com/brunoos/luasec.git
synced 2024-12-26 20:48:22 +01:00
LuaJIT 2.1.0 added luaL_newlib() as extension
This commit is contained in:
parent
fe1fb0b350
commit
60f02f7701
@ -14,9 +14,13 @@
|
||||
#endif
|
||||
|
||||
#if (LUA_VERSION_NUM == 501)
|
||||
|
||||
#define setfuncs(L, R) luaL_register(L, NULL, R)
|
||||
#define lua_rawlen(L, i) lua_objlen(L, i)
|
||||
#ifndef luaL_newlib
|
||||
#define luaL_newlib(L, R) do { lua_newtable(L); luaL_register(L, NULL, R); } while(0)
|
||||
#endif
|
||||
|
||||
#else
|
||||
#define setfuncs(L, R) luaL_setfuncs(L, R, 0)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user