Mission Base

Program Base Library Functions

void** pblListToArray

( PblList* list )

Returns an array containing all of the elements in this list in the correct order.

Documentation

Returns an array containing all of the elements in this list in the correct order.

Note: The pointer array returned is malloced from heap, the caller has to free it after it is no longer needed!

The size of the pointer array malloced and returned is defined by the pblListSize() of the list.

This method has a time complexity of O(N), with N being the size of the list.

Parameters:
list - The list to use
Returns:
void * retptr != NULL: The array containing the elements of the list.
void * retptr == NULL: An error, see pbl_errno:
PBL_ERROR_OUT_OF_MEMORY - Out of memory.
PBL_ERROR_OUT_OF_BOUNDS - The list is empty.

Alphabetic index



This page was generated with the help of DOC++.