dynamic_array.h v0.3.1
Reference-counted dynamic arrays for C
|
Reference-counted dynamic array structure. More...
#include <dynamic_array.h>
Public Attributes | |
DA_ATOMIC_INT | ref_count |
Reference count (atomic if DA_ATOMIC_REFCOUNT=1) | |
int | length |
Current number of elements. | |
int | capacity |
Allocated capacity. | |
int | element_size |
Size of each element in bytes. | |
void * | data |
Pointer to element data. | |
void(* | retain_fn )(void *) |
Optional retain function called when elements added (NULL if not needed) | |
void(* | release_fn )(void *) |
Optional release function called when elements removed (NULL if not needed) | |
Reference-counted dynamic array structure.