25 return (
array_t){.start = NULL, .type_size = type_size, .count = 0, .capacity = 0};
void array_clear(array_t *self)
Clears properly the array.
array_t array_new(size_t type_size)
Contructs an empty array, no memory is allocated.
void array_clear_f(array_t *self, void(*cleanup)(void *))
Release the resources of each elements before clearing the array.
Internal state of a dynamic array.
void array_iter(const array_t *self, void(*function)(void *))
Call function on each element.
O2S array implementation.
void * start
Underlying storage.
size_t count
Number of elements currently stored.
size_t capacity
Number of elements that can fit in the storage.