docs/Writerside/topics/list.h.md

changeset 1436
c331add0d9f8
parent 1433
81c301a59b7c
equal deleted inserted replaced
1435:48ebf22b698e 1436:c331add0d9f8
349 However, the optimized list-internal compare implementation is only used when both the compare functions and the list classes are identical. 349 However, the optimized list-internal compare implementation is only used when both the compare functions and the list classes are identical.
350 Otherwise, `cxListCompare()` will behave as if you were iterating through both lists and manually comparing the elements. 350 Otherwise, `cxListCompare()` will behave as if you were iterating through both lists and manually comparing the elements.
351 351
352 The return value of `cxListCompare()` is zero if the lists are element-wise equivalent. 352 The return value of `cxListCompare()` is zero if the lists are element-wise equivalent.
353 If they are not, the non-zero return value equals the return value of the used compare function for the first pair of elements that are not equal. 353 If they are not, the non-zero return value equals the return value of the used compare function for the first pair of elements that are not equal.
354
355 ## Clone
356
357 ```C
358 #include <cx/allocator.h>
359
360 typedef void*(cx_clone_func)(
361 void *target, const void *source,
362 const CxAllocator *allocator,
363 void *data);
364
365 #include <cx/list.h>
366
367 size_t cxListClone(CxList *dst, const CxList *src,
368 cx_clone_func clone_func,
369 const CxAllocator *clone_allocator,
370 void *data);
371 ```
354 372
355 ## Dispose 373 ## Dispose
356 374
357 ```C 375 ```C
358 #include <cx/list.h> 376 #include <cx/list.h>

mercurial