Function darray_copy

Function Documentation

struct darray *darray_copy(const struct darray *arr, uint32_t flags, void *elements)

Create a copy of a darray.

Makes a copy of an darray by initializing a new darray and copying the original darray’s data to it. The original darray is unchanged.

Parameters:
  • arr – The darray handle.

  • flags – Initialization flags for the new darray

  • elements – Space for the elements of the new darray. Can be NULL.

Returns:

The new arr, or NULL if an error occurred.