--- a/src/list.c Tue Dec 16 18:32:35 2025 +0100 +++ b/src/list.c Tue Dec 16 18:33:12 2025 +0100 @@ -828,14 +828,14 @@ list->collection.advanced_destructor = destr2_bak; } -static void* cx_list_simple_clone_func(void *dst, const void *src, const CxAllocator *al, void *data) { +static void* cx_list_shallow_clone_func(void *dst, const void *src, const CxAllocator *al, void *data) { size_t elem_size = *(size_t*)data; if (dst == NULL) dst = cxMalloc(al, elem_size); if (dst != NULL) memcpy(dst, src, elem_size); return dst; } -#define use_simple_clone_func(list) cx_list_simple_clone_func, NULL, (void*)&((list)->collection.elem_size) +#define use_shallow_clone_func(list) cx_list_shallow_clone_func, NULL, (void*)&((list)->collection.elem_size) int cxListClone(CxList *dst, const CxList *src, cx_clone_func clone_func, const CxAllocator *clone_allocator, void *data) { @@ -1097,19 +1097,19 @@ } int cxListCloneShallow(CxList *dst, const CxList *src) { - return cxListClone(dst, src, use_simple_clone_func(src)); + return cxListClone(dst, src, use_shallow_clone_func(src)); } int cxListDifferenceShallow(CxList *dst, const CxList *minuend, const CxList *subtrahend) { - return cxListDifference(dst, minuend, subtrahend, use_simple_clone_func(minuend)); + return cxListDifference(dst, minuend, subtrahend, use_shallow_clone_func(minuend)); } int cxListIntersectionShallow(CxList *dst, const CxList *src, const CxList *other) { - return cxListIntersection(dst, src, other, use_simple_clone_func(src)); + return cxListIntersection(dst, src, other, use_shallow_clone_func(src)); } int cxListUnionShallow(CxList *dst, const CxList *src, const CxList *other) { - return cxListUnion(dst, src, other, use_simple_clone_func(src)); + return cxListUnion(dst, src, other, use_shallow_clone_func(src)); } int cxListReserve(CxList *list, size_t capacity) {