src/array_list.c

changeset 807
c8d692131b1e
parent 804
5136f2fc32ec
child 817
949908c97474
     1.1 --- a/src/array_list.c	Sun Jan 14 13:50:17 2024 +0100
     1.2 +++ b/src/array_list.c	Mon Jan 15 20:59:18 2024 +0100
     1.3 @@ -106,8 +106,7 @@
     1.4  #ifndef CX_ARRAY_SWAP_SBO_SIZE
     1.5  #define CX_ARRAY_SWAP_SBO_SIZE 128
     1.6  #endif
     1.7 -
     1.8 -bool CX_DISABLE_ARRAY_LIST_SWAP_SBO = false;
     1.9 +unsigned cx_array_swap_sbo_size = CX_ARRAY_SWAP_SBO_SIZE;
    1.10  
    1.11  void cx_array_swap(
    1.12          void *arr,
    1.13 @@ -124,7 +123,7 @@
    1.14      void *tmp;
    1.15  
    1.16      // decide if we can use the local buffer
    1.17 -    if (elem_size > CX_ARRAY_SWAP_SBO_SIZE || CX_DISABLE_ARRAY_LIST_SWAP_SBO) {
    1.18 +    if (elem_size > CX_ARRAY_SWAP_SBO_SIZE) {
    1.19          tmp = malloc(elem_size);
    1.20          // we don't want to enforce error handling
    1.21          if (tmp == NULL) abort();

mercurial