cvector · Section 3
cvector_data_ptr
NAME
cvector_data_ptr - get pointer to internal data array
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cvector.h> void *cvector_data_ptr(cvec v);
DESCRIPTION
Returns a pointer to the vector's internal contiguous data array, which is handy for passing the data to C APIs that expect an array.
PARAMETERS
v Vector to get the data pointer from
RETURN VALUE
A pointer to the internal data array.
NOTES
The pointer becomes invalid once the vector is resized. It points at capacity elements, but only elem_count of them are valid. The function asserts if v is NULL.