934 if (list == NULL) return NULL; |
934 if (list == NULL) return NULL; |
935 |
935 |
936 list->base.cl = &cx_linked_list_class; |
936 list->base.cl = &cx_linked_list_class; |
937 list->base.allocator = allocator; |
937 list->base.allocator = allocator; |
938 list->base.cmpfunc = comparator; |
938 list->base.cmpfunc = comparator; |
939 list->base.itemsize = item_size; |
|
940 list->base.capacity = SIZE_MAX; |
939 list->base.capacity = SIZE_MAX; |
|
940 |
|
941 if (item_size > 0) { |
|
942 list->base.itemsize = item_size; |
|
943 } else { |
|
944 cxListStorePointers((CxList *) list); |
|
945 } |
941 |
946 |
942 return (CxList *) list; |
947 return (CxList *) list; |
943 } |
948 } |
944 |
949 |
945 CxList *cxLinkedListCreate( |
950 CxList *cxLinkedListCreate( |