From 2c4646a0ee60b374d8c3fed40057c013d8655c61 Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Wed, 10 Dec 2025 07:52:29 +0100 Subject: [PATCH] update append --- cig.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cig.h b/cig.h index 0de7662..5ffc6b7 100644 --- a/cig.h +++ b/cig.h @@ -153,9 +153,9 @@ void dyn_array_shrink_func(void *this, size_t n_items_to_remove, const char *fil size_t arr_len(void *this); size_t arr_cap(void *this); -#define arr_append(THIS, VAL) do { \ +#define arr_append(THIS, ...) do { \ THIS = arr_grow(THIS, 1); \ - THIS[arr_len(THIS)-1] = VAL; \ + THIS[arr_len(THIS)-1] = __VA_ARGS__; \ } while(0)