diff -r 44efaa54d63d -r 9cbea761fbf7 src/cx/linked_list.h --- a/src/cx/linked_list.h Sun Feb 07 21:29:51 2021 +0100 +++ b/src/cx/linked_list.h Mon Feb 08 00:14:07 2021 +0100 @@ -34,10 +34,22 @@ void *cx_linked_list_last(void **begin, void **end, ptrdiff_t loc_next); -int cx_linked_list_add(void **begin, void **end, ptrdiff_t loc_prev, ptrdiff_t loc_next, void *newnode); - -CxList cxLinkedListCreate(CxAllocator allocator, CxListComparator comparator, size_t itemsize); +int cx_linked_list_add(void **begin, void **end, ptrdiff_t loc_prev, ptrdiff_t loc_next, void *new_node); extern cx_list_class cx_linked_list_class; +typedef struct { + void **begin; + void **end; + ptrdiff_t loc_prev; + ptrdiff_t loc_next; + size_t item_size; +} CxLinkedListDesc; + +CxList cxLinkedListCreate(CxAllocator allocator, CxListComparator comparator, size_t item_size); + +CxList cxLinkedListWrap(CxAllocator allocator, CxListComparator comparator, CxLinkedListDesc desc); + +size_t cxLinkedListRecalculateSize(CxList list); + #endif /* UCX_LINKED_LIST_H */