libidav/config.c

branch
dav-2
changeset 891
4d58cbcc9efa
parent 869
cece9ef3547f
--- a/libidav/config.c	Sun Dec 07 20:16:59 2025 +0100
+++ b/libidav/config.c	Fri Dec 19 17:53:18 2025 +0100
@@ -285,7 +285,7 @@
         return NULL;
     }
     
-    CxBuffer *buf = cxBufferCreate(NULL, textLen, cxDefaultAllocator, CX_BUFFER_AUTO_EXTEND|CX_BUFFER_FREE_CONTENTS);
+    CxBuffer *buf = cxBufferCreate(cxDefaultAllocator, NULL, textLen, CX_BUFFER_AUTO_EXTEND|CX_BUFFER_FREE_CONTENTS);
     cxBufferWrite(xmlText, 1, textLen, buf);
     xmlFree(xmlText);
     return buf;
@@ -940,9 +940,9 @@
     path->length = 0;
     
     int s;
-    if(cx_strprefix(url, CX_STR("http://"))) {
+    if(cx_strprefix(url, cx_str("http://"))) {
         s = 7;
-    } else if(cx_strprefix(url, CX_STR("https://"))) {
+    } else if(cx_strprefix(url, cx_str("https://"))) {
         s = 8;
     } else {
         s = 1;
@@ -963,10 +963,10 @@
         // TODO: who is responsible for freeing this repository?
         // how can the callee know, if he has to call free()?
         repo = dav_repository_new(config);
-        repo->name.value = cx_strdup_a(config->mp->allocator, CX_STR(""));
+        repo->name.value = cx_strdup_a(config->mp->allocator, cx_str(""));
         if(url.ptr[url.length-1] == '/') {
             repo->url.value = cx_strdup_a(config->mp->allocator, url);
-            *path = cx_strdup(CX_STR("/"));
+            *path = cx_strdup(cx_str("/"));
         } else if (cx_strchr(url, '/').length > 0) {
             // TODO: fix the following workaround after
             //       fixing the inconsistent behavior of util_url_*()
@@ -975,7 +975,7 @@
             *path = cx_strdup(util_url_path_s(url));
         } else {
             repo->url.value = cx_strdup(url);
-            *path = cx_strdup(CX_STR("/"));
+            *path = cx_strdup(cx_str("/"));
         }
     }
     

mercurial