src/linked_list.c

changeset 1387
9bdd053820b7
parent 1367
6b3d52dd176e
equal deleted inserted replaced
1386:748d0d40881e 1387:9bdd053820b7
985 iter->elem_handle = CX_LL_PTR(node, ll->loc_next); 985 iter->elem_handle = CX_LL_PTR(node, ll->loc_next);
986 cx_invoke_destructor(list, node + ll->loc_data); 986 cx_invoke_destructor(list, node + ll->loc_data);
987 cx_linked_list_remove(&ll->begin, &ll->end, 987 cx_linked_list_remove(&ll->begin, &ll->end,
988 ll->loc_prev, ll->loc_next, node); 988 ll->loc_prev, ll->loc_next, node);
989 list->collection.size--; 989 list->collection.size--;
990 iter->elem_count--;
990 cxFree(list->collection.allocator, node); 991 cxFree(list->collection.allocator, node);
991 } else { 992 } else {
992 const cx_linked_list *ll = iter->src_handle.c; 993 const cx_linked_list *ll = iter->src_handle.c;
993 iter->index++; 994 iter->index++;
994 void *node = iter->elem_handle; 995 void *node = iter->elem_handle;
1007 iter->index--; 1008 iter->index--;
1008 cx_invoke_destructor(list, node + ll->loc_data); 1009 cx_invoke_destructor(list, node + ll->loc_data);
1009 cx_linked_list_remove(&ll->begin, &ll->end, 1010 cx_linked_list_remove(&ll->begin, &ll->end,
1010 ll->loc_prev, ll->loc_next, node); 1011 ll->loc_prev, ll->loc_next, node);
1011 list->collection.size--; 1012 list->collection.size--;
1013 iter->elem_count--;
1012 cxFree(list->collection.allocator, node); 1014 cxFree(list->collection.allocator, node);
1013 } else { 1015 } else {
1014 const cx_linked_list *ll = iter->src_handle.c; 1016 const cx_linked_list *ll = iter->src_handle.c;
1015 iter->index--; 1017 iter->index--;
1016 char *node = iter->elem_handle; 1018 char *node = iter->elem_handle;

mercurial