src/list.c

changeset 1444
dd9dcbb39c2f
parent 1436
c331add0d9f8
--- a/src/list.c	Fri Oct 24 21:15:14 2025 +0200
+++ b/src/list.c	Sat Oct 25 21:12:59 2025 +0200
@@ -805,7 +805,7 @@
     list->cl->deallocate(list);
 }
 
-size_t cxListClone(CxList *dst, const CxList *src, cx_clone_func clone_func,
+int cxListClone(CxList *dst, const CxList *src, cx_clone_func clone_func,
     const CxAllocator *clone_allocator, void *data) {
 
     // remember the original size
@@ -857,8 +857,8 @@
             dst->collection.size - cloned - orig_size);
         dst->collection.simple_destructor = destr_bak;
         dst->collection.advanced_destructor = destr2_bak;
+        return 1;
     }
 
-    // return how many elements we have cloned
-    return cloned;
+    return 0;
 }
\ No newline at end of file

mercurial