]>
git.ipfire.org Git - thirdparty/kmod.git/blob - shared/array.h
6 * Declaration of struct array is in header because we may want to embed the
7 * structure into another, so we need to know its size
16 void array_init(struct array
*array
, size_t step
);
17 int array_append(struct array
*array
, const void *element
);
18 int array_append_unique(struct array
*array
, const void *element
);
19 void array_pop(struct array
*array
);
20 void array_free_array(struct array
*array
);
21 void array_sort(struct array
*array
, int (*cmp
)(const void *a
, const void *b
));
22 int array_remove_at(struct array
*array
, unsigned int pos
);