Пример #1
0
void
c_list_prepend_list(c_list_t *list, c_list_t *other)
{
    if (c_list_empty(other))
        return;

    other->next->prev = list;
    other->prev->next = list->next;
    list->next->prev = other->prev;
    list->next = other->next;
}
Пример #2
0
void
_cg_memory_stack_free(cg_memory_stack_t *stack)
{

    while (!c_list_empty(&stack->sub_stacks)) {
        cg_memory_sub_stack_t *sub_stack = c_container_of(
            stack->sub_stacks.next, cg_memory_sub_stack_t, link);
        c_list_remove(&sub_stack->link);
        _cg_memory_sub_stack_free(sub_stack);
    }

    c_slice_free(cg_memory_stack_t, stack);
}
Пример #3
0
c_bool c_queue_empty(c_pqueue thiz)
{
	return c_list_empty((c_plist)thiz->_l);
}