src/cx/linked_list.h

changeset 406
9cbea761fbf7
parent 402
a34b93911956
child 407
b447539ec255
equal deleted inserted replaced
405:44efaa54d63d 406:9cbea761fbf7
32 #include <stddef.h> 32 #include <stddef.h>
33 #include "list.h" 33 #include "list.h"
34 34
35 void *cx_linked_list_last(void **begin, void **end, ptrdiff_t loc_next); 35 void *cx_linked_list_last(void **begin, void **end, ptrdiff_t loc_next);
36 36
37 int cx_linked_list_add(void **begin, void **end, ptrdiff_t loc_prev, ptrdiff_t loc_next, void *newnode); 37 int cx_linked_list_add(void **begin, void **end, ptrdiff_t loc_prev, ptrdiff_t loc_next, void *new_node);
38
39 CxList cxLinkedListCreate(CxAllocator allocator, CxListComparator comparator, size_t itemsize);
40 38
41 extern cx_list_class cx_linked_list_class; 39 extern cx_list_class cx_linked_list_class;
42 40
41 typedef struct {
42 void **begin;
43 void **end;
44 ptrdiff_t loc_prev;
45 ptrdiff_t loc_next;
46 size_t item_size;
47 } CxLinkedListDesc;
48
49 CxList cxLinkedListCreate(CxAllocator allocator, CxListComparator comparator, size_t item_size);
50
51 CxList cxLinkedListWrap(CxAllocator allocator, CxListComparator comparator, CxLinkedListDesc desc);
52
53 size_t cxLinkedListRecalculateSize(CxList list);
54
43 #endif /* UCX_LINKED_LIST_H */ 55 #endif /* UCX_LINKED_LIST_H */

mercurial