diff options
| author | 2025-01-12 14:59:28 +0100 | |
|---|---|---|
| committer | 2025-01-12 14:59:28 +0100 | |
| commit | 5aaa6192ef08de7ab6c63e85708a1c825e9ff5f1 (patch) | |
| tree | 768411ed56c9df88dbcfa113e54c4e596fb06db6 /xs.h | |
| parent | Show event start / end times. (diff) | |
| download | penes-snac2-5aaa6192ef08de7ab6c63e85708a1c825e9ff5f1.tar.gz penes-snac2-5aaa6192ef08de7ab6c63e85708a1c825e9ff5f1.tar.xz penes-snac2-5aaa6192ef08de7ab6c63e85708a1c825e9ff5f1.zip | |
Better dangling hashtag checking.
Diffstat (limited to 'xs.h')
| -rw-r--r-- | xs.h | 3 |
1 files changed, 3 insertions, 0 deletions
| @@ -157,6 +157,9 @@ unsigned int xs_hash_func(const char *data, int size); | |||
| 157 | #define xs_is_true(v) (xs_type((v)) == XSTYPE_TRUE) | 157 | #define xs_is_true(v) (xs_type((v)) == XSTYPE_TRUE) |
| 158 | #define xs_is_false(v) (xs_type((v)) == XSTYPE_FALSE) | 158 | #define xs_is_false(v) (xs_type((v)) == XSTYPE_FALSE) |
| 159 | #define xs_not(v) xs_stock(xs_is_true((v)) ? XSTYPE_FALSE : XSTYPE_TRUE) | 159 | #define xs_not(v) xs_stock(xs_is_true((v)) ? XSTYPE_FALSE : XSTYPE_TRUE) |
| 160 | #define xs_is_string(v) (xs_type((v)) == XSTYPE_STRING) | ||
| 161 | #define xs_is_list(v) (xs_type((v)) == XSTYPE_LIST) | ||
| 162 | #define xs_is_dict(v) (xs_type((v)) == XSTYPE_DICT) | ||
| 160 | 163 | ||
| 161 | #define xs_list_foreach(l, v) for (int ct_##__LINE__ = 0; xs_list_next(l, &v, &ct_##__LINE__); ) | 164 | #define xs_list_foreach(l, v) for (int ct_##__LINE__ = 0; xs_list_next(l, &v, &ct_##__LINE__); ) |
| 162 | #define xs_dict_foreach(l, k, v) for (int ct_##__LINE__ = 0; xs_dict_next(l, &k, &v, &ct_##__LINE__); ) | 165 | #define xs_dict_foreach(l, k, v) for (int ct_##__LINE__ = 0; xs_dict_next(l, &k, &v, &ct_##__LINE__); ) |