eris: add general purpose 'flag bits' to lua tables'
This commit is contained in:
@@ -905,6 +905,9 @@ static void
|
||||
p_literaltable(Info *info) { /* ... tbl */
|
||||
eris_checkstack(info->L, 3);
|
||||
|
||||
unsigned char bits = lua_getflagbits(info->L, -1);
|
||||
WRITE_VALUE(bits, uint8_t);
|
||||
|
||||
/* Persist all key / value pairs. */
|
||||
lua_pushnil(info->L); /* ... tbl nil */
|
||||
while (lua_next(info->L, -2)) { /* ... tbl k v */
|
||||
@@ -943,6 +946,8 @@ u_literaltable(Info *info) { /* ... */
|
||||
eris_checkstack(info->L, 3);
|
||||
|
||||
lua_newtable(info->L); /* ... tbl */
|
||||
unsigned char bits = READ_VALUE(uint8_t);
|
||||
lua_setflagbits(info->L, -1, bits);
|
||||
|
||||
/* Preregister table for handling of cycles (keys, values or metatable). */
|
||||
registerobject(info);
|
||||
|
||||
Reference in New Issue
Block a user