Add accessors to view flag bits in lua
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user