src/cx/array_list.h

changeset 855
35bcb3216c0d
parent 844
3270ea9e41ef
     1.1 --- a/src/cx/array_list.h	Thu May 23 20:29:28 2024 +0200
     1.2 +++ b/src/cx/array_list.h	Thu May 23 20:31:37 2024 +0200
     1.3 @@ -226,9 +226,9 @@
     1.4  ) __attribute__((__nonnull__));
     1.5  
     1.6  /**
     1.7 - * Allocates an array list for storing elements with \p item_size bytes each.
     1.8 + * Allocates an array list for storing elements with \p elem_size bytes each.
     1.9   *
    1.10 - * If \p item_size is CX_STORE_POINTERS, the created list will be created as if
    1.11 + * If \p elem_size is CX_STORE_POINTERS, the created list will be created as if
    1.12   * cxListStorePointers() was called immediately after creation and the compare
    1.13   * function will be automatically set to cx_cmp_ptr(), if none is given.
    1.14   *
    1.15 @@ -237,34 +237,34 @@
    1.16   * @param comparator the comparator for the elements
    1.17   * (if \c NULL, and the list is not storing pointers, sort and find
    1.18   * functions will not work)
    1.19 - * @param item_size the size of each element in bytes
    1.20 + * @param elem_size the size of each element in bytes
    1.21   * @param initial_capacity the initial number of elements the array can store
    1.22   * @return the created list
    1.23   */
    1.24  CxList *cxArrayListCreate(
    1.25          CxAllocator const *allocator,
    1.26          cx_compare_func comparator,
    1.27 -        size_t item_size,
    1.28 +        size_t elem_size,
    1.29          size_t initial_capacity
    1.30  );
    1.31  
    1.32  /**
    1.33 - * Allocates an array list for storing elements with \p item_size bytes each.
    1.34 + * Allocates an array list for storing elements with \p elem_size bytes each.
    1.35   *
    1.36   * The list will use the cxDefaultAllocator and \em NO compare function.
    1.37   * If you want to call functions that need a compare function, you have to
    1.38   * set it immediately after creation or use cxArrayListCreate().
    1.39   *
    1.40 - * If \p item_size is CX_STORE_POINTERS, the created list will be created as if
    1.41 + * If \p elem_size is CX_STORE_POINTERS, the created list will be created as if
    1.42   * cxListStorePointers() was called immediately after creation and the compare
    1.43   * function will be automatically set to cx_cmp_ptr().
    1.44   *
    1.45 - * @param item_size the size of each element in bytes
    1.46 + * @param elem_size the size of each element in bytes
    1.47   * @param initial_capacity the initial number of elements the array can store
    1.48   * @return the created list
    1.49   */
    1.50 -#define cxArrayListCreateSimple(item_size, initial_capacity) \
    1.51 -    cxArrayListCreate(NULL, NULL, item_size, initial_capacity)
    1.52 +#define cxArrayListCreateSimple(elem_size, initial_capacity) \
    1.53 +    cxArrayListCreate(NULL, NULL, elem_size, initial_capacity)
    1.54  
    1.55  #ifdef __cplusplus
    1.56  } // extern "C"

mercurial