1.1 --- a/src/linked_list.c Thu Feb 23 22:27:41 2023 +0100 1.2 +++ b/src/linked_list.c Thu Feb 23 22:43:13 2023 +0100 1.3 @@ -295,7 +295,7 @@ 1.4 ) { 1.5 void *sbo[CX_LINKED_LIST_SORT_SBO_SIZE]; 1.6 void **sorted = length >= CX_LINKED_LIST_SORT_SBO_SIZE ? 1.7 - malloc(sizeof(void *) * length) : sbo; 1.8 + malloc(sizeof(void *) * length) : sbo; 1.9 if (sorted == NULL) abort(); 1.10 void *rc, *lc; 1.11 1.12 @@ -870,7 +870,7 @@ 1.13 cx_ll_iterator, 1.14 }; 1.15 1.16 -CxList *cxLinkedListCreate( 1.17 +static CxList *cx_linked_list_create( 1.18 CxAllocator const *allocator, 1.19 CxListComparator comparator, 1.20 size_t item_size 1.21 @@ -886,3 +886,15 @@ 1.22 1.23 return (CxList *) list; 1.24 } 1.25 + 1.26 +CxList *cxLinkedListCreate( 1.27 + CxAllocator const *allocator, 1.28 + CxListComparator comparator, 1.29 + size_t item_size 1.30 +) { 1.31 + return cx_linked_list_create(allocator, comparator, item_size); 1.32 +} 1.33 + 1.34 +CxList *cxLinkedListCreateSimple(size_t item_size) { 1.35 + return cx_linked_list_create(cxDefaultAllocator, NULL, item_size); 1.36 +}