Add accessors to view flag bits in lua

This commit is contained in:
2021-07-25 20:34:57 -04:00
parent bcd5f044d2
commit 4052503093

View File

@@ -131,6 +131,23 @@ LuaDefine(table_clear, "c") {
return LS.result();
}
LuaDefine(table_getflagbits, "c") {
LuaArg tab;
LuaRet bits;
LuaStack LS(L, tab, bits);
unsigned char ubits = lua_getflagbits(L, tab.index());
LS.set(bits, ubits);
return LS.result();
}
LuaDefine(table_setflagbits, "c") {
LuaArg tab, bits;
LuaStack LS(L, tab, bits);
unsigned char ubits = LS.ckinteger(bits);
lua_setflagbits(L, tab.index(), ubits);
return LS.result();
}
/////////////////////////////////////////////////////////////
//
// Deque operators.