Move some of the difference-transmission unit tests from lua to C++

This commit is contained in:
2026-02-25 01:48:23 -05:00
parent 829537a8d6
commit adead5149e
7 changed files with 311 additions and 310 deletions

View File

@@ -116,8 +116,8 @@ World::World(WorldType wt) {
}
// Prepare to manipulate the lua state.
LuaVar world, globtab;
LuaExtStack LS(state(), world, globtab);
LuaVar world;
LuaExtStack LS(state(), world);
// Put the world pointer into the lua registry.
World::store_global_pointer(state(), this);
@@ -125,14 +125,6 @@ World::World(WorldType wt) {
// Clear the lthread state.
clear_lthread_state();
// Set the tabletype of the registry.
LS.settabletype(LuaRegistry, LUA_TT_REGISTRY);
// Set the tabletype of the global environment.
LS.getglobaltable(globtab);
LS.settabletype(globtab, LUA_TT_GLOBALENV);
// Create the globaldb in the registry.
LS.rawset(LuaRegistry, "globaldb", LuaNewTable);