src/map.c

changeset 1616
bdc04a8e0dd3
parent 1604
68b75c091028
--- a/src/map.c	Tue Dec 16 18:32:35 2025 +0100
+++ b/src/map.c	Tue Dec 16 18:33:12 2025 +0100
@@ -142,14 +142,14 @@
     map->collection.advanced_destructor = destr2_bak;
 }
 
-static void* cx_map_simple_clone_func(void *dst, const void *src, const CxAllocator *al, void *data) {
+static void* cx_map_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(map) cx_map_simple_clone_func, NULL, (void*)&((map)->collection.elem_size)
+#define use_shallow_clone_func(map) cx_map_shallow_clone_func, NULL, (void*)&((map)->collection.elem_size)
 
 int cxMapClone(CxMap *dst, const CxMap *src, cx_clone_func clone_func,
         const CxAllocator *clone_allocator, void *data) {
@@ -306,27 +306,27 @@
 }
 
 int cxMapCloneShallow(CxMap *dst, const CxMap *src) {
-    return cxMapClone(dst, src, use_simple_clone_func(src));
+    return cxMapClone(dst, src, use_shallow_clone_func(src));
 }
 
 int cxMapDifferenceShallow(CxMap *dst, const CxMap *minuend, const CxMap *subtrahend) {
-    return cxMapDifference(dst, minuend, subtrahend, use_simple_clone_func(minuend));
+    return cxMapDifference(dst, minuend, subtrahend, use_shallow_clone_func(minuend));
 }
 
 int cxMapListDifferenceShallow(CxMap *dst, const CxMap *src, const CxList *keys) {
-    return cxMapListDifference(dst, src, keys, use_simple_clone_func(src));
+    return cxMapListDifference(dst, src, keys, use_shallow_clone_func(src));
 }
 
 int cxMapIntersectionShallow(CxMap *dst, const CxMap *src, const CxMap *other) {
-    return cxMapIntersection(dst, src, other, use_simple_clone_func(src));
+    return cxMapIntersection(dst, src, other, use_shallow_clone_func(src));
 }
 
 int cxMapListIntersectionShallow(CxMap *dst, const CxMap *src, const CxList *keys) {
-    return cxMapListIntersection(dst, src, keys, use_simple_clone_func(src));
+    return cxMapListIntersection(dst, src, keys, use_shallow_clone_func(src));
 }
 
 int cxMapUnionShallow(CxMap *dst, const CxMap *src) {
-    return cxMapUnion(dst, src, use_simple_clone_func(src));
+    return cxMapUnion(dst, src, use_shallow_clone_func(src));
 }
 
 int cxMapCompare(const CxMap *map, const CxMap *other) {

mercurial