diff --git a/src/logic/scripting/api_lua.cpp b/src/logic/scripting/api_lua.cpp index c48e4000..a5f0a7b2 100644 --- a/src/logic/scripting/api_lua.cpp +++ b/src/logic/scripting/api_lua.cpp @@ -14,10 +14,10 @@ #include "../../lighting/Lighting.h" #include "../../logic/BlocksController.h" -#if (LUA_VERSION_NUM < 503 and not defined(LUAJIT_VERSION)) -static void luaL_openlib(lua_State* L, const char* name, const luaL_Reg* libfuncs) { +#if (LUA_VERSION_NUM < 502) +inline void luaL_openlib(lua_State* L, const char* name, const luaL_Reg* libfuncs, int nup) { lua_newtable(L); - luaL_setfuncs(L, libfuncs, 0); + luaL_setfuncs(L, libfuncs, nup); lua_setglobal(L, name); } #endif