mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 17:15:21 +02:00
script: Replace calls to depreated luaL_openlib
This commit is contained in:
@@ -234,7 +234,7 @@ void NodeMetaRef::RegisterCommon(lua_State *L)
|
||||
void NodeMetaRef::Register(lua_State *L)
|
||||
{
|
||||
RegisterCommon(L);
|
||||
luaL_openlib(L, 0, methodsServer, 0); // fill methodtable
|
||||
luaL_register(L, nullptr, methodsServer); // fill methodtable
|
||||
lua_pop(L, 1); // drop methodtable
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ const luaL_Reg NodeMetaRef::methodsServer[] = {
|
||||
void NodeMetaRef::RegisterClient(lua_State *L)
|
||||
{
|
||||
RegisterCommon(L);
|
||||
luaL_openlib(L, 0, methodsClient, 0); // fill methodtable
|
||||
luaL_register(L, nullptr, methodsClient); // fill methodtable
|
||||
lua_pop(L, 1); // drop methodtable
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user