diff -r 0a71ac9547fd -r d0d95740071b src/linked_list.c --- a/src/linked_list.c Thu Feb 23 22:27:41 2023 +0100 +++ b/src/linked_list.c Thu Feb 23 22:43:13 2023 +0100 @@ -295,7 +295,7 @@ ) { void *sbo[CX_LINKED_LIST_SORT_SBO_SIZE]; void **sorted = length >= CX_LINKED_LIST_SORT_SBO_SIZE ? - malloc(sizeof(void *) * length) : sbo; + malloc(sizeof(void *) * length) : sbo; if (sorted == NULL) abort(); void *rc, *lc; @@ -870,7 +870,7 @@ cx_ll_iterator, }; -CxList *cxLinkedListCreate( +static CxList *cx_linked_list_create( CxAllocator const *allocator, CxListComparator comparator, size_t item_size @@ -886,3 +886,15 @@ return (CxList *) list; } + +CxList *cxLinkedListCreate( + CxAllocator const *allocator, + CxListComparator comparator, + size_t item_size +) { + return cx_linked_list_create(allocator, comparator, item_size); +} + +CxList *cxLinkedListCreateSimple(size_t item_size) { + return cx_linked_list_create(cxDefaultAllocator, NULL, item_size); +}