src/array_list.c

changeset 819
5da2ead43077
parent 818
2be8fe3d5a2d
child 820
8b86ee2e09bb
     1.1 --- a/src/array_list.c	Thu Jan 25 22:01:12 2024 +0100
     1.2 +++ b/src/array_list.c	Thu Jan 25 22:05:48 2024 +0100
     1.3 @@ -50,7 +50,7 @@
     1.4  
     1.5  // LOW LEVEL ARRAY LIST FUNCTIONS
     1.6  
     1.7 -enum cx_array_copy_result cx_array_copy(
     1.8 +enum cx_array_result cx_array_copy(
     1.9          void **target,
    1.10          size_t *size,
    1.11          size_t *capacity,
    1.12 @@ -77,7 +77,7 @@
    1.13      if (needrealloc) {
    1.14          // a reallocator and a capacity variable must be available
    1.15          if (reallocator == NULL || capacity == NULL) {
    1.16 -            return CX_ARRAY_COPY_REALLOC_NOT_SUPPORTED;
    1.17 +            return CX_ARRAY_REALLOC_NOT_SUPPORTED;
    1.18          }
    1.19  
    1.20          // check, if we need to repair the src pointer
    1.21 @@ -95,7 +95,7 @@
    1.22                  *target, cap, elem_size, reallocator
    1.23          );
    1.24          if (newmem == NULL) {
    1.25 -            return CX_ARRAY_COPY_REALLOC_FAILED;
    1.26 +            return CX_ARRAY_REALLOC_FAILED;
    1.27          }
    1.28  
    1.29          // repair src pointer, if necessary
    1.30 @@ -117,7 +117,7 @@
    1.31      *size = newsize;
    1.32  
    1.33      // return successfully
    1.34 -    return CX_ARRAY_COPY_SUCCESS;
    1.35 +    return CX_ARRAY_SUCCESS;
    1.36  }
    1.37  
    1.38  #ifndef CX_ARRAY_SWAP_SBO_SIZE
    1.39 @@ -227,7 +227,7 @@
    1.40          size_t elems_to_move = list->size - index;
    1.41          size_t start_of_moved = index + n;
    1.42  
    1.43 -        if (CX_ARRAY_COPY_SUCCESS != cx_array_copy(
    1.44 +        if (CX_ARRAY_SUCCESS != cx_array_copy(
    1.45                  &arl->data,
    1.46                  &list->size,
    1.47                  &arl->capacity,
    1.48 @@ -247,7 +247,7 @@
    1.49      // therefore, it is impossible to leave this function with an invalid array
    1.50  
    1.51      // place the new elements
    1.52 -    if (CX_ARRAY_COPY_SUCCESS == cx_array_copy(
    1.53 +    if (CX_ARRAY_SUCCESS == cx_array_copy(
    1.54              &arl->data,
    1.55              &list->size,
    1.56              &arl->capacity,

mercurial