diff options
author | Thijs Schreijer <thijs@thijsschreijer.nl> | 2024-05-23 08:23:14 +0200 |
---|---|---|
committer | Thijs Schreijer <thijs@thijsschreijer.nl> | 2024-05-23 08:23:14 +0200 |
commit | 7e9447c98588730738724176d9acc595be6299e6 (patch) | |
tree | 7bec18966d7e4f4078a0be5cb6cf4f8db3dc5ece /src/bitflags.h | |
parent | b3cd71ddf2bbadb63fa4dc4ef1147b5c4ae95994 (diff) | |
download | luasystem-7e9447c98588730738724176d9acc595be6299e6.tar.gz luasystem-7e9447c98588730738724176d9acc595be6299e6.tar.bz2 luasystem-7e9447c98588730738724176d9acc595be6299e6.zip |
fix several tests
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); |