Added two new stack disciplines to LuaStack

This commit is contained in:
2023-04-06 20:12:03 -04:00
parent b8df2bbc89
commit 7f000bc0fd
26 changed files with 401 additions and 271 deletions

View File

@@ -10,8 +10,8 @@
LuaSnap::LuaSnap() {
state_ = LuaStack::newstate(eng::l_alloc);
LuaStack LS(state_);
state_ = LuaOldStack::newstate(eng::l_alloc);
LuaOldStack LS(state_);
// Create the persist table and the unpersist table.
//
@@ -36,7 +36,7 @@ void LuaSnap::serialize(StreamBuffer *sb) {
// lua variables that we'll need.
LuaVar key, value;
LuaRet permstable, regcopy;
LuaStack LS(state_, permstable, regcopy, key, value);
LuaOldStack LS(state_, permstable, regcopy, key, value);
// Construct a copy of the registry table.
LS.set(regcopy, LuaNewTable);
@@ -93,7 +93,7 @@ void LuaSnap::deserialize(StreamBuffer *sb) {
// Set up a stack frame.
LuaArg permstable, regcopy;
LuaVar key, value;
LuaStack LS(state_, permstable, regcopy, key, value);
LuaOldStack LS(state_, permstable, regcopy, key, value);
assert(LS.istable(regcopy));