src/map.c

changeset 1587
7156d6699410
parent 1579
0393c67556ec
--- a/src/map.c	Sat Dec 13 15:16:25 2025 +0100
+++ b/src/map.c	Sat Dec 13 16:27:16 2025 +0100
@@ -110,11 +110,11 @@
 }
 
 int cx_map_put(CxMap *map, CxHashKey key, void *value) {
-    return map->cl->put(map, key, value) == NULL;
+    return map->cl->put(map, key, value).key == NULL;
 }
 
 void *cx_map_emplace(CxMap *map, CxHashKey key) {
-    return map->cl->put(map, key, NULL);
+    return map->cl->put(map, key, NULL).value;
 }
 
 void *cx_map_get(const CxMap *map, CxHashKey key) {

mercurial