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
     1.1 --- a/CHANGELOG	Sun Feb 18 13:38:42 2024 +0100
     1.2 +++ b/CHANGELOG	Sun Feb 18 21:12:28 2024 +0100
     1.3 @@ -2,8 +2,7 @@
     1.4  ------------------------
     1.5   * adds tree.h
     1.6   * adds cx_array_default_reallocator
     1.7 - * adds cx_array_add()
     1.8 - * adds cx_array_declare() and cx_array_simple_*() convenience macros
     1.9 + * adds several new cx_array_*() functions
    1.10   * adds cx_linked_list_find_node()
    1.11   * adds cxListFindRemove()
    1.12   * adds cxBufferReset()
     2.1 --- a/docs/src/features.md	Sun Feb 18 13:38:42 2024 +0100
     2.2 +++ b/docs/src/features.md	Sun Feb 18 21:12:28 2024 +0100
     2.3 @@ -318,7 +318,7 @@
     2.4  
     2.5  If you just want to add one single element to an existing array, you can use the macro `cx_array_add()`.
     2.6  In that case, since the element is added to the end of the array, the `capacity` argument is mandatory.
     2.7 -You can use `cx_array_declare()` to declare the necessary fields within a structure and then use the
     2.8 +You can use `CX_ARRAY_DECLARE()` to declare the necessary fields within a structure and then use the
     2.9  `cx_array_simple_*()` convenience macros to reduce code overhead.
    2.10  
    2.11  ## Map
     3.1 --- a/src/cx/array_list.h	Sun Feb 18 13:38:42 2024 +0100
     3.2 +++ b/src/cx/array_list.h	Sun Feb 18 21:12:28 2024 +0100
     3.3 @@ -54,14 +54,15 @@
     3.4   *
     3.5   * @see cx_array_simple_add()
     3.6   * @see cx_array_simple_copy()
     3.7 + * @see cx_array_initialize()
     3.8   */
     3.9 -#define cx_array_declare(type, name) \
    3.10 +#define CX_ARRAY_DECLARE(type, name) \
    3.11      type * name;                     \
    3.12      size_t name##_size;              \
    3.13      size_t name##_capacity;
    3.14  
    3.15  /**
    3.16 - * Initializes an array declared with cx_array_declare().
    3.17 + * Initializes an array declared with CX_ARRAY_DECLARE().
    3.18   *
    3.19   * The memory for the array is allocated with stdlib malloc().
    3.20   * @param array the array
     4.1 --- a/src/tree.c	Sun Feb 18 13:38:42 2024 +0100
     4.2 +++ b/src/tree.c	Sun Feb 18 21:12:28 2024 +0100
     4.3 @@ -109,7 +109,7 @@
     4.4      }
     4.5  
     4.6      // create a working stack
     4.7 -    cx_array_declare(void const*, work);
     4.8 +    CX_ARRAY_DECLARE(void const*, work);
     4.9      cx_array_initialize(work, 32);
    4.10  
    4.11      // add the children of root to the working stack
     5.1 --- a/tests/test_list.c	Sun Feb 18 13:38:42 2024 +0100
     5.2 +++ b/tests/test_list.c	Sun Feb 18 21:12:28 2024 +0100
     5.3 @@ -41,7 +41,7 @@
     5.4      int *stackarray = stackspace;
     5.5      size_t stackarray_size = 3;
     5.6      size_t stackarray_capacity = 5;
     5.7 -    cx_array_declare(int, heaparray);
     5.8 +    CX_ARRAY_DECLARE(int, heaparray);
     5.9      heaparray = calloc(5, sizeof(int));
    5.10      heaparray[0] = 2;
    5.11      heaparray[1] = 3;

mercurial