blob: 0e47246ad651a74e530b09b98b3b7a02ed586142 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#ifndef LSBITFLAGS_H
#define LSBITFLAGS_H
#include <lua.h>
#include "compat.h"
#include <lauxlib.h>
#include <stdlib.h>
// type used to store the bitflags
#define LSBF_BITFLAG lua_Integer
// Validates that the given index is a bitflag object and returns its value.
// If the index is not a bitflag object, a Lua error is raised.
// The value will be left on the stack.
LSBF_BITFLAG lsbf_checkbitflags(lua_State *L, int index);
// Pushes a new bitflag object with the given value onto the stack.
// Might raise a Lua error if memory allocation fails.
void lsbf_pushbitflags(lua_State *L, LSBF_BITFLAG value);
#endif
|