chsvlib
chsv helper source code

◆ ListBackData()

EXTERN_C void* Chusov::ListBackData ( HCHSVLIST  hList)
noexcept

Returns a pointer to data at the end of the list.

Parameters
hListis a handle to the list.
Returns
On success the function returns a pointer to data at the end of the list. On failure the function returns NULL. See remarks.
Remarks
The list is not thread-safe.
If the last 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.