aboutsummaryrefslogtreecommitdiff
path: root/array.h
AgeCommit message (Collapse)AuthorFilesLines
2016-03-30array: allow arbitrarily sized array elementsMarc André Tanner1-5/+30
There exist two typical ways to use an array: 1) to hold pointers to externally allocated memory regions Use array_init(...) for initialization, an element has the size of a pointer. Use the functions suffixed with `_ptr' to manage your pointers. The cleanup function array_release_full must only be used with this type of array. 2) to hold arbitrary sized objects Use array_init_sized(...) to specify the size of a single element. Use the regular (i.e. without the `_ptr' suffix) functions to manage your objects. array_get will return a pointer to the object stored within the array.
2016-02-18Add a simple dynamically growing array data structureMarc André Tanner1-0/+31