Numbering and pairing of lua tables

This commit is contained in:
2021-08-13 17:02:35 -04:00
parent ee16970a8a
commit 7581ac7278
7 changed files with 504 additions and 7 deletions

View File

@@ -371,6 +371,7 @@ public:
bool isboolean(LuaSlot s) const { return lua_type(L_, s) == LUA_TBOOLEAN; }
bool isnil(LuaSlot s) const { return lua_type(L_, s) == LUA_TNIL; }
bool iscfunction(LuaSlot s) const { return lua_iscfunction(L_, s) != 0; }
bool issortablekey(LuaSlot s) const;
void checktable(LuaSlot index) const { checktype(index, LUA_TTABLE); }
void checkstring(LuaSlot index) const { checktype(index, LUA_TSTRING); }
@@ -389,7 +390,7 @@ public:
void clearmetatable(LuaSlot tab) const;
void setmetatable(LuaSlot tab, LuaSlot mt) const;
void getmetatable(LuaSlot mt, LuaSlot tab) const;
bool getmetatable(LuaSlot mt, LuaSlot tab) const;
void checknometa(LuaSlot index) const;
void newtable(LuaSlot target) const;
@@ -406,6 +407,8 @@ public:
void makeclass(LuaSlot tab, LuaSlot name) const;
void getclass(LuaSlot tab, LuaSlot name) const;
void movesortablekey(LuaSlot val, lua_State *L);
void makeclass(LuaSlot tab, const char *name) const {
push_any_value(name);
LuaSpecial classname(lua_gettop(L_));