1
0
镜像自地址 https://github.com/luanti-org/luanti.git 已同步 2025-12-16 03:55:24 +01:00

script: Replace calls to depreated luaL_openlib

这个提交包含在:
sfan5
2021-05-25 20:20:16 +02:00
父节点 a12017c564
当前提交 a0047d6edc
修改 17 个文件,包含 22 行新增22 行删除

查看文件

@@ -372,7 +372,7 @@ void LuaAreaStore::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // drop methodtable
// Can be created from Lua (AreaStore())

查看文件

@@ -219,7 +219,7 @@ void LuaCamera::Register(lua_State *L)
lua_pop(L, 1);
luaL_openlib(L, 0, methods, 0);
luaL_register(L, nullptr, methods);
lua_pop(L, 1);
}

查看文件

@@ -228,7 +228,7 @@ void LuaRaycast::Register(lua_State *L)
lua_pop(L, 1);
luaL_openlib(L, 0, methods, 0);
luaL_register(L, nullptr, methods);
lua_pop(L, 1);
lua_register(L, className, create_object);

查看文件

@@ -456,7 +456,7 @@ void InvRef::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // drop methodtable
// Cannot be created from Lua

查看文件

@@ -483,7 +483,7 @@ void LuaItemStack::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // drop methodtable
// Can be created from Lua (ItemStack(itemstack or itemstring or table or nil))

查看文件

@@ -114,7 +114,7 @@ void ItemStackMetaRef::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // drop methodtable
// Cannot be created from Lua

查看文件

@@ -446,7 +446,7 @@ void LuaLocalPlayer::Register(lua_State *L)
lua_pop(L, 1); // Drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // Drop methodtable
}

查看文件

@@ -211,7 +211,7 @@ void LuaMinimap::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // drop methodtable
}

查看文件

@@ -107,7 +107,7 @@ void ModChannelRef::Register(lua_State *L)
lua_pop(L, 1); // Drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // Drop methodtable
}

查看文件

@@ -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
}

查看文件

@@ -122,7 +122,7 @@ void NodeTimerRef::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // drop methodtable
// Cannot be created from Lua

查看文件

@@ -122,7 +122,7 @@ void LuaPerlinNoise::Register(lua_State *L)
lua_pop(L, 1);
luaL_openlib(L, 0, methods, 0);
luaL_register(L, nullptr, methods);
lua_pop(L, 1);
lua_register(L, className, create_object);
@@ -380,7 +380,7 @@ void LuaPerlinNoiseMap::Register(lua_State *L)
lua_pop(L, 1);
luaL_openlib(L, 0, methods, 0);
luaL_register(L, nullptr, methods);
lua_pop(L, 1);
lua_register(L, className, create_object);
@@ -485,7 +485,7 @@ void LuaPseudoRandom::Register(lua_State *L)
lua_pop(L, 1);
luaL_openlib(L, 0, methods, 0);
luaL_register(L, nullptr, methods);
lua_pop(L, 1);
lua_register(L, className, create_object);
@@ -584,7 +584,7 @@ void LuaPcgRandom::Register(lua_State *L)
lua_pop(L, 1);
luaL_openlib(L, 0, methods, 0);
luaL_register(L, nullptr, methods);
lua_pop(L, 1);
lua_register(L, className, create_object);
@@ -699,7 +699,7 @@ void LuaSecureRandom::Register(lua_State *L)
lua_pop(L, 1);
luaL_openlib(L, 0, methods, 0);
luaL_register(L, nullptr, methods);
lua_pop(L, 1);
lua_register(L, className, create_object);

查看文件

@@ -2311,7 +2311,7 @@ void ObjectRef::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // drop methodtable
}

查看文件

@@ -97,7 +97,7 @@ void PlayerMetaRef::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0);
luaL_register(L, nullptr, methods);
lua_pop(L, 1);
// Cannot be created from Lua

查看文件

@@ -334,7 +334,7 @@ void LuaSettings::Register(lua_State* L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // drop methodtable
// Can be created from Lua (Settings(filename))

查看文件

@@ -110,7 +110,7 @@ void StorageRef::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // drop methodtable
}

查看文件

@@ -450,7 +450,7 @@ void LuaVoxelManip::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // drop methodtable
// Can be created from Lua (VoxelManip())