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
     1.1 --- a/src/cx/printf.h	Fri Apr 21 20:17:09 2023 +0200
     1.2 +++ b/src/cx/printf.h	Fri Apr 21 20:28:55 2023 +0200
     1.3 @@ -96,7 +96,7 @@
     1.4   */
     1.5  __attribute__((__nonnull__(1, 2), __format__(printf, 2, 3)))
     1.6  cxmutstr cx_asprintf_a(
     1.7 -        CxAllocator *allocator,
     1.8 +        CxAllocator const *allocator,
     1.9          char const *fmt,
    1.10          ...
    1.11  );
    1.12 @@ -129,7 +129,7 @@
    1.13   */
    1.14  __attribute__((__nonnull__))
    1.15  cxmutstr cx_vasprintf_a(
    1.16 -        CxAllocator *allocator,
    1.17 +        CxAllocator const *allocator,
    1.18          char const *fmt,
    1.19          va_list ap
    1.20  );
     2.1 --- a/src/cx/string.h	Fri Apr 21 20:17:09 2023 +0200
     2.2 +++ b/src/cx/string.h	Fri Apr 21 20:28:55 2023 +0200
     2.3 @@ -275,7 +275,7 @@
     2.4   */
     2.5  __attribute__((__nonnull__))
     2.6  void cx_strfree_a(
     2.7 -        CxAllocator *alloc,
     2.8 +        CxAllocator const *alloc,
     2.9          cxmutstr *str
    2.10  );
    2.11  
    2.12 @@ -311,7 +311,7 @@
    2.13   */
    2.14  __attribute__((__warn_unused_result__, __nonnull__))
    2.15  cxmutstr cx_strcat_a(
    2.16 -        CxAllocator *alloc,
    2.17 +        CxAllocator const *alloc,
    2.18          size_t count,
    2.19          ...
    2.20  );
    2.21 @@ -583,7 +583,7 @@
    2.22   */
    2.23  __attribute__((__warn_unused_result__, __nonnull__))
    2.24  size_t cx_strsplit_a(
    2.25 -        CxAllocator *allocator,
    2.26 +        CxAllocator const *allocator,
    2.27          cxstring string,
    2.28          cxstring delim,
    2.29          size_t limit,
    2.30 @@ -632,7 +632,7 @@
    2.31   */
    2.32  __attribute__((__warn_unused_result__, __nonnull__))
    2.33  size_t cx_strsplit_ma(
    2.34 -        CxAllocator *allocator,
    2.35 +        CxAllocator const *allocator,
    2.36          cxmutstr string,
    2.37          cxstring delim,
    2.38          size_t limit,
    2.39 @@ -714,7 +714,7 @@
    2.40   */
    2.41  __attribute__((__warn_unused_result__, __nonnull__))
    2.42  cxmutstr cx_strdup_a(
    2.43 -        CxAllocator *allocator,
    2.44 +        CxAllocator const *allocator,
    2.45          cxstring string
    2.46  );
    2.47  
    2.48 @@ -853,7 +853,7 @@
    2.49   */
    2.50  __attribute__((__warn_unused_result__, __nonnull__))
    2.51  cxmutstr cx_strreplacen_a(
    2.52 -        CxAllocator *allocator,
    2.53 +        CxAllocator const *allocator,
    2.54          cxstring str,
    2.55          cxstring pattern,
    2.56          cxstring replacement,
     3.1 --- a/src/printf.c	Fri Apr 21 20:17:09 2023 +0200
     3.2 +++ b/src/printf.c	Fri Apr 21 20:28:55 2023 +0200
     3.3 @@ -80,7 +80,7 @@
     3.4  }
     3.5  
     3.6  cxmutstr cx_asprintf_a(
     3.7 -        CxAllocator *allocator,
     3.8 +        CxAllocator const *allocator,
     3.9          char const *fmt,
    3.10          ...
    3.11  ) {
    3.12 @@ -93,7 +93,7 @@
    3.13  }
    3.14  
    3.15  cxmutstr cx_vasprintf_a(
    3.16 -        CxAllocator *a,
    3.17 +        CxAllocator const *a,
    3.18          char const *fmt,
    3.19          va_list ap
    3.20  ) {
     4.1 --- a/src/string.c	Fri Apr 21 20:17:09 2023 +0200
     4.2 +++ b/src/string.c	Fri Apr 21 20:28:55 2023 +0200
     4.3 @@ -72,7 +72,7 @@
     4.4  }
     4.5  
     4.6  void cx_strfree_a(
     4.7 -        CxAllocator *alloc,
     4.8 +        CxAllocator const *alloc,
     4.9          cxmutstr *str
    4.10  ) {
    4.11      cxFree(alloc, str->ptr);
    4.12 @@ -99,7 +99,7 @@
    4.13  }
    4.14  
    4.15  cxmutstr cx_strcat_a(
    4.16 -        CxAllocator *alloc,
    4.17 +        CxAllocator const *alloc,
    4.18          size_t count,
    4.19          ...
    4.20  ) {
    4.21 @@ -369,7 +369,7 @@
    4.22  }
    4.23  
    4.24  size_t cx_strsplit_a(
    4.25 -        CxAllocator *allocator,
    4.26 +        CxAllocator const *allocator,
    4.27          cxstring string,
    4.28          cxstring delim,
    4.29          size_t limit,
    4.30 @@ -411,7 +411,7 @@
    4.31  }
    4.32  
    4.33  size_t cx_strsplit_ma(
    4.34 -        CxAllocator *allocator,
    4.35 +        CxAllocator const *allocator,
    4.36          cxmutstr string,
    4.37          cxstring delim,
    4.38          size_t limit,
    4.39 @@ -470,7 +470,7 @@
    4.40  }
    4.41  
    4.42  cxmutstr cx_strdup_a(
    4.43 -        CxAllocator *allocator,
    4.44 +        CxAllocator const *allocator,
    4.45          cxstring string
    4.46  ) {
    4.47      cxmutstr result = {
    4.48 @@ -579,7 +579,7 @@
    4.49  }
    4.50  
    4.51  cxmutstr cx_strreplacen_a(
    4.52 -        CxAllocator *allocator,
    4.53 +        CxAllocator const *allocator,
    4.54          cxstring str,
    4.55          cxstring pattern,
    4.56          cxstring replacement,

mercurial