-
-
Notifications
You must be signed in to change notification settings - Fork 3
iarray_get.3
Manvendra Bhangui edited this page May 7, 2023
·
4 revisions
iarray_get - get pointer to nth element in iarray
#include <iarray.h>
void* iarray_get(iarray* x, size_t pos);
iarray x; size_t pos; t* p = iarray_get(&x,pos);
iarray_get is similar to iarray_allocate, but it only works if the element has previously been allocated. If the element in the iarray is not there, this function will fail instead of manipulating the iarray. This also guarantees that there will be no locks, so this function returns in a deterministic time.
Return a pointer to the requested element. If there is no such element in the array, returns NULL.