chsvlib
chsv helper source code

◆ ListGetDataFromIter()

EXTERN_C void* Chusov::ListGetDataFromIter ( HCHSVLISTITERATOR  hListIterator)
noexcept

Returns a pointer to data bound with the specified iterator.

Parameters
hListIteratoris a handle to the iterator bound with an element storing required data.
Returns
On success the function returns a pointer to data of the list element. On failure the function returns NULL. See remarks.
Remarks
The list is not thread-safe.
If the element stores a NULL pointer, the function returns NULL just like on failure. To avoid ambiguity set the last chsvlib error code to CHSVERROR_SUCCESS before calling the function. On failure the function would set the last chsvlib error code according to the failure.
The pointer returned by the function is not constant means that the caller can modify the pointed data. If this data was pointed by value (i.e. by calling ListPushFrontValueByValue(), ListPushBackValueByValue(), ListInsertValueBeforeIterByValue() or ListInsertValueAfterIterByValue()) then the size of data could be read or modified for the element can be determined by calling the ListGetDataSizeFromIter() function.
Declared in chsvlist.h.
See also
ListBegin();
ListEnd();
ListIterPrev();
ListIterNext().