C Collections

cvector · Section 3

cvector_data_ptr

cvector_data_ptr - get pointer to internal data array

C Collections (libccollections, -lccollections)

#include <ccollections/cvector.h>
 
void *cvector_data_ptr(cvec v);

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.

v    Vector to get the data pointer from

A pointer to the internal data array.

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.

cvec_data_ptr(3), cvector_at(3)