cp_vector_create(3) - Linux man page
Name
cp_vector_create, cp_vector_create_by_option - create a vector object
Synopsis
#include <cprops/vector.h>
cp_vector *cp_vector_create(int size);
cp_vector *cp_vector_create_by_option(int size,
int mode, cp_copy_fn copy_item, cp_destructor_fn free_item);
cp_vector *cp_vector_wrap(void **data, int len, int mode);
Description
cp_vector_create_by_option creates a vector with initial storage for size items with the given mode, using copy_item to copy items on insertion if mode has the COLLECTION_MODE_COPY bit set, and free_item to release items if mode has the COLLECTION_MODE_DEEP bit set.
cp_vector_create is equivalent to
-
cp_vector_create_by_mode(size, COLLECTION_MODE_MULTIPLE_VALUES, NULL, NULL)- cp_vector_wrap creates a cp_vector object with the given data parameter as its content, setting the initial size to size and the operation mode to mode.
Return Value
a newly created cp_vector on success or NULL on failure.
See Also
cp_vector_destroy(3), cp_vector_destroy_custom(3)