XArray
typedef struct XArray_t XArray;
typedef struct XArray_t XArray;
typedef enum{
XARRAY_OK=0,
XARRAY_INVALID_RANGE=1,
XARRAY_MEMORY_ALLOCATION_FAILED=2,
XARRAY_INDEX_OUT_OF_BOUNDS=3,
XARRAY_EMPTY=4
}XArrayError;
Create a new dynamic array.
X_ARRAY_API XArray * x_array_create(
size_t elementSize,
size_t capacity
);
size_t elementSizesize_t capacityPointer to the newly created array, or NULL on failure.
Destroy the array and free all associated memory.
X_ARRAY_API void x_array_destroy(XArray *arr);
XArray *arrNothing.