capitalize cx_array_declare()

Sun, 18 Feb 2024 21:12:28 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 18 Feb 2024 21:12:28 +0100
changeset 834
04c53b3c8378
parent 833
5c926801f052
child 835
13068743197f

capitalize cx_array_declare()

CHANGELOG file | annotate | diff | comparison | revisions
docs/src/features.md file | annotate | diff | comparison | revisions
src/cx/array_list.h file | annotate | diff | comparison | revisions
src/tree.c file | annotate | diff | comparison | revisions
tests/test_list.c file | annotate | diff | comparison | revisions
--- a/CHANGELOG	Sun Feb 18 13:38:42 2024 +0100
+++ b/CHANGELOG	Sun Feb 18 21:12:28 2024 +0100
@@ -2,8 +2,7 @@
 ------------------------
  * adds tree.h
  * adds cx_array_default_reallocator
- * adds cx_array_add()
- * adds cx_array_declare() and cx_array_simple_*() convenience macros
+ * adds several new cx_array_*() functions
  * adds cx_linked_list_find_node()
  * adds cxListFindRemove()
  * adds cxBufferReset()
--- a/docs/src/features.md	Sun Feb 18 13:38:42 2024 +0100
+++ b/docs/src/features.md	Sun Feb 18 21:12:28 2024 +0100
@@ -318,7 +318,7 @@
 
 If you just want to add one single element to an existing array, you can use the macro `cx_array_add()`.
 In that case, since the element is added to the end of the array, the `capacity` argument is mandatory.
-You can use `cx_array_declare()` to declare the necessary fields within a structure and then use the
+You can use `CX_ARRAY_DECLARE()` to declare the necessary fields within a structure and then use the
 `cx_array_simple_*()` convenience macros to reduce code overhead.
 
 ## Map
--- a/src/cx/array_list.h	Sun Feb 18 13:38:42 2024 +0100
+++ b/src/cx/array_list.h	Sun Feb 18 21:12:28 2024 +0100
@@ -54,14 +54,15 @@
  *
  * @see cx_array_simple_add()
  * @see cx_array_simple_copy()
+ * @see cx_array_initialize()
  */
-#define cx_array_declare(type, name) \
+#define CX_ARRAY_DECLARE(type, name) \
     type * name;                     \
     size_t name##_size;              \
     size_t name##_capacity;
 
 /**
- * Initializes an array declared with cx_array_declare().
+ * Initializes an array declared with CX_ARRAY_DECLARE().
  *
  * The memory for the array is allocated with stdlib malloc().
  * @param array the array
--- a/src/tree.c	Sun Feb 18 13:38:42 2024 +0100
+++ b/src/tree.c	Sun Feb 18 21:12:28 2024 +0100
@@ -109,7 +109,7 @@
     }
 
     // create a working stack
-    cx_array_declare(void const*, work);
+    CX_ARRAY_DECLARE(void const*, work);
     cx_array_initialize(work, 32);
 
     // add the children of root to the working stack
--- a/tests/test_list.c	Sun Feb 18 13:38:42 2024 +0100
+++ b/tests/test_list.c	Sun Feb 18 21:12:28 2024 +0100
@@ -41,7 +41,7 @@
     int *stackarray = stackspace;
     size_t stackarray_size = 3;
     size_t stackarray_capacity = 5;
-    cx_array_declare(int, heaparray);
+    CX_ARRAY_DECLARE(int, heaparray);
     heaparray = calloc(5, sizeof(int));
     heaparray[0] = 2;
     heaparray[1] = 3;

mercurial