aboutsummaryrefslogtreecommitdiff
path: root/src/bitflags.h
diff options
context:
space:
mode:
authorThijs Schreijer <thijs@thijsschreijer.nl>2024-05-23 08:23:14 +0200
committerThijs Schreijer <thijs@thijsschreijer.nl>2024-05-23 08:23:14 +0200
commit7e9447c98588730738724176d9acc595be6299e6 (patch)
tree7bec18966d7e4f4078a0be5cb6cf4f8db3dc5ece /src/bitflags.h
parentb3cd71ddf2bbadb63fa4dc4ef1147b5c4ae95994 (diff)
downloadluasystem-7e9447c98588730738724176d9acc595be6299e6.tar.gz
luasystem-7e9447c98588730738724176d9acc595be6299e6.tar.bz2
luasystem-7e9447c98588730738724176d9acc595be6299e6.zip
fix several tests
Diffstat (limited to 'src/bitflags.h')
-rw-r--r--src/bitflags.h9
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.
15LSBF_BITFLAG lsbf_checkbitflags(lua_State *L, int index); 15LSBF_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.
23LSBF_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.
19void lsbf_pushbitflags(lua_State *L, LSBF_BITFLAG value); 28void lsbf_pushbitflags(lua_State *L, LSBF_BITFLAG value);