114 int end_idx_exclusive)
118 out->
size = end_idx_exclusive - start_idx;
162 if (capacity <= za->
alloc)
165 while (za->
alloc < capacity) {
200 assert(idx < za->
size);
217 assert(idx < za->
size);
219 *((
void**) p) = &za->
data[idx*za->
el_sz];
225 assert(sz <= za->
size);
238 assert(idx < za->
size);
241 if (idx < za->size-1)
248 int ncopy = za->
size - idx - 1;
278 for (
int idx = 0; idx < za->
size; idx++) {
301 assert(idx <= za->
size);
305 int ncopy = za->
size - idx;
324 assert(idx < za->
size);
344 for (
int idx = 0; idx < za->
size; idx++)
382 for (
int idx = 0; idx < za->
size; idx++) {
409 assert(compar != NULL);
420 int zstrcmp(
const void * a_pp,
const void * b_pp);
432 for (
int i = 0; i < za->
size; i++) {
447 assert(dest != NULL);
448 assert(source != NULL);
450 assert(end <= source->
size);
456 int count = end - start;
static int zarray_index_of(const zarray_t *za, const void *p)
static int zarray_contains(const zarray_t *za, const void *p)
static void zarray_get_volatile(const zarray_t *za, int idx, void *p)
static void zarray_sort(zarray_t *za, int(*compar)(const void *, const void *))
static int zarray_remove_value(zarray_t *za, const void *p, int shuffle)
static int zarray_size(const zarray_t *za)
static void zarray_ensure_capacity(zarray_t *za, int capacity)
static void zarray_destroy(zarray_t *za)
static void zarray_set(zarray_t *za, int idx, const void *p, void *outp)
static void zarray_remove_index(zarray_t *za, int idx, int shuffle)
static void zarray_add_range(zarray_t *dest, const zarray_t *source, int start, int end)
static zarray_t * zarray_create(size_t el_sz)
static zarray_t * zarray_copy(const zarray_t *za)
static void zarray_map(zarray_t *za, void(*f)(void *))
static zarray_t * zarray_copy_subset(const zarray_t *za, int start_idx, int end_idx_exclusive)
static void zarray_truncate(zarray_t *za, int sz)
static void zarray_get(const zarray_t *za, int idx, void *p)
void zarray_vmap(zarray_t *za, void(*f)())
static void zarray_clear(zarray_t *za)
static void zarray_insert(zarray_t *za, int idx, const void *p)
int zstrcmp(const void *a_pp, const void *b_pp)
static int iceillog2(int v)
static void zarray_add(zarray_t *za, const void *p)