list_iterator_t * list_iterator_new_from_node(list_node_t *node, list_direction_t direction) { list_iterator_t *self; if (!(self = LIST_MALLOC(sizeof(list_iterator_t)))) return NULL; self->next = node; self->direction = direction; return self; }
list_t * list_new() { list_t *self; if (!(self = LIST_MALLOC(sizeof(list_t)))) return NULL; self->head = NULL; self->tail = NULL; self->free = NULL; self->match = NULL; self->len = 0; return self; }