rewrite arr_contains

This commit is contained in:
2025-12-10 07:48:02 +01:00
parent 2560ad99e7
commit 1492d885dd
+5 -5
View File
@@ -177,11 +177,11 @@ bool dyn_array_contains_func(void *this, uint8_t *value);
- Pure C99, no extensions needed
- Callers with typeof support can make wrapper macros
*/
#define arr_contains(THIS, TYPE, VALUE)\
(\
STATIC_ASSERT(sizeof(*(THIS)) == sizeof(TYPE)),\
dyn_array_contains_func((THIS), (uint8_t*)&(TYPE){(VALUE)})\
)
#define arr_contains(THIS, ...)\
(\
STATIC_ASSERT(sizeof(*(THIS)) == sizeof(*(__VA_ARGS__))),\
dyn_array_contains_func((THIS), (uint8_t*)(__VA_ARGS__))\
)
// CLI /////////////////////////////////////////////////////////////////////////