src/array_list.c

changeset 662
d0d95740071b
parent 660
4738a9065907
child 664
af5bf4603a5d
     1.1 --- a/src/array_list.c	Thu Feb 23 22:27:41 2023 +0100
     1.2 +++ b/src/array_list.c	Thu Feb 23 22:43:13 2023 +0100
     1.3 @@ -460,7 +460,7 @@
     1.4          cx_arl_iterator,
     1.5  };
     1.6  
     1.7 -CxList *cxArrayListCreate(
     1.8 +static CxList *cx_array_list_create(
     1.9          CxAllocator const *allocator,
    1.10          CxListComparator comparator,
    1.11          size_t item_size,
    1.12 @@ -487,3 +487,21 @@
    1.13  
    1.14      return (CxList *) list;
    1.15  }
    1.16 +
    1.17 +CxList *cxArrayListCreate(
    1.18 +        CxAllocator const *allocator,
    1.19 +        CxListComparator comparator,
    1.20 +        size_t item_size,
    1.21 +        size_t initial_capacity
    1.22 +) {
    1.23 +    return cx_array_list_create(allocator, comparator,
    1.24 +                                item_size, initial_capacity);
    1.25 +}
    1.26 +
    1.27 +CxList *cxArrayListCreateSimple(
    1.28 +        size_t item_size,
    1.29 +        size_t initial_capacity
    1.30 +) {
    1.31 +    return cx_array_list_create(cxDefaultAllocator, NULL,
    1.32 +                                item_size, initial_capacity);
    1.33 +}

mercurial