ucx/properties.c

changeset 22
112b85020dc9
parent 21
5ea41679e15d
child 23
b26390e77237
--- a/ucx/properties.c	Thu May 29 15:59:27 2025 +0200
+++ b/ucx/properties.c	Wed Nov 12 18:37:58 2025 +0100
@@ -51,6 +51,12 @@
     cxBufferDestroy(&prop->buffer);
 }
 
+void cxPropertiesReset(CxProperties *prop) {
+    CxPropertiesConfig config = prop->config;
+    cxPropertiesDestroy(prop);
+    cxPropertiesInit(prop, config);
+}
+
 int cxPropertiesFilln(
         CxProperties *prop,
         const char *buf,
@@ -244,7 +250,7 @@
     CxMap *map = sink->sink;
     CxAllocator *alloc = sink->data;
     cxmutstr v = cx_strdup_a(alloc, value);
-    int r = cx_map_put_cxstr(map, key, v.ptr);
+    int r = cxMapPut(map, key, v.ptr);
     if (r != 0) cx_strfree_a(alloc, &v);
     return r;
 }

mercurial