diff -r 425234b05dff -r 949908c97474 src/array_list.c --- a/src/array_list.c Mon Jan 22 19:34:38 2024 +0100 +++ b/src/array_list.c Wed Jan 24 22:19:05 2024 +0100 @@ -31,6 +31,21 @@ #include #include +// Default array reallocator + +static void *cx_array_default_realloc( + void *array, + size_t capacity, + size_t elem_size, + __attribute__((__unused__)) struct cx_array_reallocator_s *alloc +) { + return realloc(array, capacity * elem_size); +} + +struct cx_array_reallocator_s cx_array_default_reallocator = { + cx_array_default_realloc, NULL, NULL, 0, 0 +}; + // LOW LEVEL ARRAY LIST FUNCTIONS enum cx_array_copy_result cx_array_copy(