Skip to content

cf_array_static

Category: array
GitHub: cute_array.h


Initializes a dynamic array backed by a static (stack) buffer.

#define cf_array_static(a, buffer, buffer_size) astatic(a, buffer, buffer_size)
Parameters Description
a The array pointer. Modified in-place.
buffer A stack buffer to use as initial storage.
buffer_size Size of buffer in bytes.

Remarks

Shortform: astatic(a, buffer, buffer_size). The array will copy out of the static buffer and switch to heap allocation if it outgrows the buffer.

cf_array_fit
cf_array_free