ucx/map.c

changeset 854
1c8401ece69e
parent 852
83fdf679df99
--- a/ucx/map.c	Mon Jan 06 21:18:56 2025 +0100
+++ b/ucx/map.c	Sun Feb 23 13:11:32 2025 +0100
@@ -46,12 +46,12 @@
     return false;
 }
 
-static CxIterator cx_empty_map_iterator(
+static CxMapIterator cx_empty_map_iterator(
         const struct cx_map_s *map,
         cx_attr_unused enum cx_map_iterator_type type
 ) {
-    CxIterator iter = {0};
-    iter.src_handle.c = map;
+    CxMapIterator iter = {0};
+    iter.map.c = map;
     iter.base.valid = cx_empty_map_iter_valid;
     return iter;
 }
@@ -66,37 +66,38 @@
 };
 
 CxMap cx_empty_map = {
-        {
-                NULL,
-                NULL,
-                0,
-                0,
-                NULL,
-                NULL,
-                NULL,
-                false
-        },
-        &cx_empty_map_class
+    {
+        NULL,
+        NULL,
+        0,
+        0,
+        NULL,
+        NULL,
+        NULL,
+        false,
+        true
+    },
+    &cx_empty_map_class
 };
 
 CxMap *const cxEmptyMap = &cx_empty_map;
 
 // </editor-fold>
 
-CxIterator cxMapMutIteratorValues(CxMap *map) {
-    CxIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_VALUES);
+CxMapIterator cxMapMutIteratorValues(CxMap *map) {
+    CxMapIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_VALUES);
     it.base.mutating = true;
     return it;
 }
 
-CxIterator cxMapMutIteratorKeys(CxMap *map) {
-    CxIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_KEYS);
+CxMapIterator cxMapMutIteratorKeys(CxMap *map) {
+    CxMapIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_KEYS);
     it.base.mutating = true;
     return it;
 }
 
-CxIterator cxMapMutIterator(CxMap *map) {
-    CxIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_PAIRS);
+CxMapIterator cxMapMutIterator(CxMap *map) {
+    CxMapIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_PAIRS);
     it.base.mutating = true;
     return it;
 }

mercurial