Loading...
Searching...
No Matches
Go to the documentation of this file.
8#define SET_FLAG(a, b) (a)->flag |= (ae_flag_##b)
10#define SET_FLAG(a, b) \
12 const int f = a->flag | (ae_flag_##b); \
13 (a->flag) = (ae_flag)f; \
16#define GET_FLAG(a, b) (((a)->flag & ae_flag_##b) == (ae_flag_##b))
17#define SAFE_FLAG(a, b) (a && ((a)->flag & (ae_flag_##b)) == (ae_flag_##b))
18#define UNSET_FLAG(a, b) ((a)->flag &= ~(ae_flag_##b))
33#define _FLAG_FUNC(A, a) \
34 ANN static inline int a##flag(const A a, const enum a##flag flag) { \
35 return (a->a##flag & flag) == flag; \
37 static inline int safe_##a##flag(const A a, const enum a##flag flag) { \
38 return a ? ((a->a##flag & flag) == flag) : 0; \
41#define FLAG_FUNC(A, a) \
42 ANN static inline void set_##a##flag(A a, const enum a##flag flag) { \
45 static inline void unset_##a##flag(A a, const enum a##flag flag) { \
46 a->a##flag &= ~flag; \
50#define FLAG_FUNC(A, a) \
51 ANN static inline void set_##a##flag(A a, const enum a##flag flag) { \
52 auto ff = a->a##flag | flag; \
53 a->a##flag = static_cast<enum a##flag>(ff); \
55 static inline void unset_##a##flag(A a, const enum a##flag flag) { \
56 const auto ff = a->a##flag & ~flag; \
57 a->a##flag = static_cast<enum a##flag>(ff); \