fix missing const qualifier for allocator

Fri, 21 Apr 2023 20:28:55 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 21 Apr 2023 20:28:55 +0200
changeset 693
494d9b20b99e
parent 692
6ac92936cd44
child 694
ac827d873c17

fix missing const qualifier for allocator

src/cx/printf.h file | annotate | diff | comparison | revisions
src/cx/string.h file | annotate | diff | comparison | revisions
src/printf.c file | annotate | diff | comparison | revisions
src/string.c file | annotate | diff | comparison | revisions
--- a/src/cx/printf.h	Fri Apr 21 20:17:09 2023 +0200
+++ b/src/cx/printf.h	Fri Apr 21 20:28:55 2023 +0200
@@ -96,7 +96,7 @@
  */
 __attribute__((__nonnull__(1, 2), __format__(printf, 2, 3)))
 cxmutstr cx_asprintf_a(
-        CxAllocator *allocator,
+        CxAllocator const *allocator,
         char const *fmt,
         ...
 );
@@ -129,7 +129,7 @@
  */
 __attribute__((__nonnull__))
 cxmutstr cx_vasprintf_a(
-        CxAllocator *allocator,
+        CxAllocator const *allocator,
         char const *fmt,
         va_list ap
 );
--- a/src/cx/string.h	Fri Apr 21 20:17:09 2023 +0200
+++ b/src/cx/string.h	Fri Apr 21 20:28:55 2023 +0200
@@ -275,7 +275,7 @@
  */
 __attribute__((__nonnull__))
 void cx_strfree_a(
-        CxAllocator *alloc,
+        CxAllocator const *alloc,
         cxmutstr *str
 );
 
@@ -311,7 +311,7 @@
  */
 __attribute__((__warn_unused_result__, __nonnull__))
 cxmutstr cx_strcat_a(
-        CxAllocator *alloc,
+        CxAllocator const *alloc,
         size_t count,
         ...
 );
@@ -583,7 +583,7 @@
  */
 __attribute__((__warn_unused_result__, __nonnull__))
 size_t cx_strsplit_a(
-        CxAllocator *allocator,
+        CxAllocator const *allocator,
         cxstring string,
         cxstring delim,
         size_t limit,
@@ -632,7 +632,7 @@
  */
 __attribute__((__warn_unused_result__, __nonnull__))
 size_t cx_strsplit_ma(
-        CxAllocator *allocator,
+        CxAllocator const *allocator,
         cxmutstr string,
         cxstring delim,
         size_t limit,
@@ -714,7 +714,7 @@
  */
 __attribute__((__warn_unused_result__, __nonnull__))
 cxmutstr cx_strdup_a(
-        CxAllocator *allocator,
+        CxAllocator const *allocator,
         cxstring string
 );
 
@@ -853,7 +853,7 @@
  */
 __attribute__((__warn_unused_result__, __nonnull__))
 cxmutstr cx_strreplacen_a(
-        CxAllocator *allocator,
+        CxAllocator const *allocator,
         cxstring str,
         cxstring pattern,
         cxstring replacement,
--- a/src/printf.c	Fri Apr 21 20:17:09 2023 +0200
+++ b/src/printf.c	Fri Apr 21 20:28:55 2023 +0200
@@ -80,7 +80,7 @@
 }
 
 cxmutstr cx_asprintf_a(
-        CxAllocator *allocator,
+        CxAllocator const *allocator,
         char const *fmt,
         ...
 ) {
@@ -93,7 +93,7 @@
 }
 
 cxmutstr cx_vasprintf_a(
-        CxAllocator *a,
+        CxAllocator const *a,
         char const *fmt,
         va_list ap
 ) {
--- a/src/string.c	Fri Apr 21 20:17:09 2023 +0200
+++ b/src/string.c	Fri Apr 21 20:28:55 2023 +0200
@@ -72,7 +72,7 @@
 }
 
 void cx_strfree_a(
-        CxAllocator *alloc,
+        CxAllocator const *alloc,
         cxmutstr *str
 ) {
     cxFree(alloc, str->ptr);
@@ -99,7 +99,7 @@
 }
 
 cxmutstr cx_strcat_a(
-        CxAllocator *alloc,
+        CxAllocator const *alloc,
         size_t count,
         ...
 ) {
@@ -369,7 +369,7 @@
 }
 
 size_t cx_strsplit_a(
-        CxAllocator *allocator,
+        CxAllocator const *allocator,
         cxstring string,
         cxstring delim,
         size_t limit,
@@ -411,7 +411,7 @@
 }
 
 size_t cx_strsplit_ma(
-        CxAllocator *allocator,
+        CxAllocator const *allocator,
         cxmutstr string,
         cxstring delim,
         size_t limit,
@@ -470,7 +470,7 @@
 }
 
 cxmutstr cx_strdup_a(
-        CxAllocator *allocator,
+        CxAllocator const *allocator,
         cxstring string
 ) {
     cxmutstr result = {
@@ -579,7 +579,7 @@
 }
 
 cxmutstr cx_strreplacen_a(
-        CxAllocator *allocator,
+        CxAllocator const *allocator,
         cxstring str,
         cxstring pattern,
         cxstring replacement,

mercurial