diff options
Diffstat (limited to 'src/bitflags.h')
-rw-r--r-- | src/bitflags.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bitflags.h b/src/bitflags.h index 0e47246..f16b041 100644 --- a/src/bitflags.h +++ b/src/bitflags.h | |||
@@ -14,6 +14,15 @@ | |||
14 | // The value will be left on the stack. | 14 | // The value will be left on the stack. |
15 | LSBF_BITFLAG lsbf_checkbitflags(lua_State *L, int index); | 15 | LSBF_BITFLAG lsbf_checkbitflags(lua_State *L, int index); |
16 | 16 | ||
17 | |||
18 | // Validates that the given index is a table containing a field 'fieldname' | ||
19 | // which is a bitflag object and returns its value. | ||
20 | // If the index is not a table or the field is not a bitflag object, a Lua | ||
21 | // error is raised. If the bitflag is not present, the default value is returned. | ||
22 | // The stack remains unchanged. | ||
23 | LSBF_BITFLAG lsbf_checkbitflagsfield(lua_State *L, int index, const char *fieldname, LSBF_BITFLAG default_value); | ||
24 | |||
25 | |||
17 | // Pushes a new bitflag object with the given value onto the stack. | 26 | // Pushes a new bitflag object with the given value onto the stack. |
18 | // Might raise a Lua error if memory allocation fails. | 27 | // Might raise a Lua error if memory allocation fails. |
19 | void lsbf_pushbitflags(lua_State *L, LSBF_BITFLAG value); | 28 | void lsbf_pushbitflags(lua_State *L, LSBF_BITFLAG value); |