Do a lot of cleanup on module table/vector

This commit is contained in:
2023-04-13 16:55:48 -04:00
parent 7078d1243d
commit 8ea6c47e4c
4 changed files with 217 additions and 76 deletions

View File

@@ -459,6 +459,10 @@ int LuaCoreStack::rawlen(LuaSlot obj) const {
return lua_rawlen(L_, obj.index());
}
int LuaCoreStack::nkeys(LuaSlot obj) const {
return lua_nkeys(L_, obj.index());
}
int LuaCoreStack::gettabletype(LuaSlot tab) const {
uint16_t bits = lua_getflagbits(L_, tab.index());
return LUA_TT_GENERAL + (bits & 0x000F);