chsvlib
chsv helper source code

◆ ListIterSetValueByPtr()

EXTERN_C bool Chusov::ListIterSetValueByPtr ( HCHSVLISTITERATOR  hListIterator,
void *  pData 
)
noexcept

Replaces data of an element bound with the specified iterator by a new pointer without any copying operations.

Parameters
hListIteratoris a handle to the iterator bound with an element with data to be replaced.
pDatais a pointer to replace the old value of the element.
Returns
true on success, false on failure.
Remarks
The list is not thread-safe.
The functions like ListPushBackValueByPtr(), ListPushFrontValueByPtr(), ListInsertValueBeforeIterByPtr(), ListInsertValueAfterIterByPtr() or ListIterSetValueByPtr() perform insertions of only pointers without physical copying of the pointed data. The data itself is ignored by the functions. The size of the data of the inserted elements will be zero, therefore for such elements zero length will be returned by the functions like ListGetDataSizeFromIter().
Declared in chsvlist.h.
See also
ListBegin();
ListEnd();
ListIterPrev();
ListIterNext().