# HG changeset patch # User Mike Becker # Date 1682101735 -7200 # Node ID 494d9b20b99e77bc0560d13080d9f1a76eadcc24 # Parent 6ac92936cd44acbc87403cd1570e3fab5030eed8 fix missing const qualifier for allocator diff -r 6ac92936cd44 -r 494d9b20b99e src/cx/printf.h --- 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 ); diff -r 6ac92936cd44 -r 494d9b20b99e src/cx/string.h --- 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, diff -r 6ac92936cd44 -r 494d9b20b99e src/printf.c --- 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 ) { diff -r 6ac92936cd44 -r 494d9b20b99e src/string.c --- 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,