mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 15:01:49 +00:00
luaL_openlib replacement fix
This commit is contained in:
parent
c7fb887888
commit
3183513e55
1 changed files with 3 additions and 3 deletions
|
|
@ -14,10 +14,10 @@
|
||||||
#include "../../lighting/Lighting.h"
|
#include "../../lighting/Lighting.h"
|
||||||
#include "../../logic/BlocksController.h"
|
#include "../../logic/BlocksController.h"
|
||||||
|
|
||||||
#if (LUA_VERSION_NUM < 503 and not defined(LUAJIT_VERSION))
|
#if (LUA_VERSION_NUM < 502)
|
||||||
static void luaL_openlib(lua_State* L, const char* name, const luaL_Reg* libfuncs) {
|
inline void luaL_openlib(lua_State* L, const char* name, const luaL_Reg* libfuncs, int nup) {
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
luaL_setfuncs(L, libfuncs, 0);
|
luaL_setfuncs(L, libfuncs, nup);
|
||||||
lua_setglobal(L, name);
|
lua_setglobal(L, name);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue