ucx/list.c

changeset 211
07a284486fa1
parent 192
1e51558b9d09
child 212
c766c423dee6
equal deleted inserted replaced
210:6bdb04d87236 211:07a284486fa1
74 e = e->next; 74 e = e->next;
75 alfree(alloc, f); 75 alfree(alloc, f);
76 } 76 }
77 } 77 }
78 78
79 void ucx_list_free_contents(UcxList* list, ucx_destructor destr) {
80 while (list != NULL) {
81 destr(list->data);
82 list = list->next;
83 }
84 }
85
79 UcxList *ucx_list_append(UcxList *l, void *data) { 86 UcxList *ucx_list_append(UcxList *l, void *data) {
80 return ucx_list_append_a(ucx_default_allocator(), l, data); 87 return ucx_list_append_a(ucx_default_allocator(), l, data);
81 } 88 }
82 89
83 UcxList *ucx_list_append_a(UcxAllocator *alloc, UcxList *l, void *data) { 90 UcxList *ucx_list_append_a(UcxAllocator *alloc, UcxList *l, void *data) {

mercurial