diff_tables and patch_table are working and tested
This commit is contained in:
@@ -5,10 +5,10 @@
|
||||
// routines in this file:
|
||||
//
|
||||
// World::number_lua_tables
|
||||
// World::unnumber_lua_tables
|
||||
// World::pair_lua_tables
|
||||
// World::pair_new_tables
|
||||
// World::number_remaining_tables
|
||||
// World::create_new_tables
|
||||
// World::unnumber_lua_tables
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -76,13 +76,6 @@ int World::number_lua_tables(const IdVector &basis) {
|
||||
return nextid - 1;
|
||||
}
|
||||
|
||||
void World::unnumber_lua_tables() {
|
||||
// All we have to do is remove these tables from the registry.
|
||||
LuaStack LS(state());
|
||||
LS.rawset(LuaRegistry, "tnmap", LuaNil);
|
||||
LS.rawset(LuaRegistry, "ntmap", LuaNil);
|
||||
}
|
||||
|
||||
void World::pair_lua_tables(const IdVector &basis, lua_State *master) {
|
||||
lua_State *synch = state();
|
||||
LuaVar stangibles, mtangibles, sntmap, mntmap, stnmap, mtnmap, stab, mtab, skey, mkey, sval, mval, sidx, midx;
|
||||
@@ -182,7 +175,7 @@ void World::pair_lua_tables(const IdVector &basis, lua_State *master) {
|
||||
SLS.result();
|
||||
}
|
||||
|
||||
int World::pair_new_tables(const IdVector &basis, lua_State *master) {
|
||||
int World::number_remaining_tables(const IdVector &basis, lua_State *master) {
|
||||
// This is conceptually recursive, but we're going to use an
|
||||
// explicit stack (the lua stack).
|
||||
lua_State *L = master;
|
||||
@@ -268,4 +261,10 @@ void World::create_new_tables(int n) {
|
||||
assert(stack_is_clear());
|
||||
}
|
||||
|
||||
void World::unnumber_lua_tables() {
|
||||
// All we have to do is remove these tables from the registry.
|
||||
LuaStack LS(state());
|
||||
LS.rawset(LuaRegistry, "tnmap", LuaNil);
|
||||
LS.rawset(LuaRegistry, "ntmap", LuaNil);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user