201 list->base.cl = &cx_linked_list_class; |
201 list->base.cl = &cx_linked_list_class; |
202 list->base.allocator = allocator; |
202 list->base.allocator = allocator; |
203 list->base.cmpfunc = comparator; |
203 list->base.cmpfunc = comparator; |
204 list->base.itemsize = item_size; |
204 list->base.itemsize = item_size; |
205 list->base.capacity = SIZE_MAX; |
205 list->base.capacity = SIZE_MAX; |
|
206 list->base.size = 0; |
206 |
207 |
207 list->begin = NULL; |
208 list->begin = NULL; |
|
209 list->end = NULL; |
208 list->loc_prev = CX_LL_LOC_PREV; |
210 list->loc_prev = CX_LL_LOC_PREV; |
209 list->loc_next = CX_LL_LOC_NEXT; |
211 list->loc_next = CX_LL_LOC_NEXT; |
210 |
212 |
211 CxList result = (CxList) list; |
213 return (CxList) list; |
212 cxLinkedListRecalculateSize(result); |
|
213 return result; |
|
214 } |
214 } |
215 |
215 |
216 void cxLinkedListDestroy(CxList list) { |
216 void cxLinkedListDestroy(CxList list) { |
217 cx_linked_list* ll = (cx_linked_list*) list; |
217 cx_linked_list* ll = (cx_linked_list*) list; |
218 |
218 |