mirror of
https://github.com/brunoos/luasec.git
synced 2024-11-08 06:28:26 +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
|
#endif
|
||||||
|
|
||||||
#if (LUA_VERSION_NUM == 501)
|
#if (LUA_VERSION_NUM == 501)
|
||||||
|
|
||||||
#define setfuncs(L, R) luaL_register(L, NULL, R)
|
#define setfuncs(L, R) luaL_register(L, NULL, R)
|
||||||
#define lua_rawlen(L, i) lua_objlen(L, i)
|
#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)
|
#define luaL_newlib(L, R) do { lua_newtable(L); luaL_register(L, NULL, R); } while(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define setfuncs(L, R) luaL_setfuncs(L, R, 0)
|
#define setfuncs(L, R) luaL_setfuncs(L, R, 0)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user