Completed port to eris lua 5.2

This commit is contained in:
2021-02-28 16:32:42 -05:00
parent 6f74c52d3b
commit 35260fa4eb
5 changed files with 42 additions and 84 deletions

View File

@@ -137,6 +137,11 @@ int LuaStack::next(LuaSlot tab, LuaSlot key, LuaSlot value) const {
return ret;
}
void LuaStack::getglobaltable(LuaSlot target) const {
lua_pushglobaltable(L_);
lua_replace(L_, target);
}
void LuaStack::newtable(LuaSlot target) const {
lua_newtable(L_);
lua_replace(L_, target);
@@ -149,6 +154,7 @@ lua_State *LuaStack::newthread(LuaSlot target) const {
}
void LuaStack::makeclass(LuaSlot classtab, LuaSlot classname) const {
lua_checkstack(L_, 20);
LuaVar globtab;
LuaStack LS(L_, globtab);