21 lines
402 B
Plaintext
21 lines
402 B
Plaintext
{Ttitle}Node *output = NULL;
|
|
|
|
if (!list || list->node_count == 0) {{
|
|
goto RETURN_{Tupper}_LIST_POP_BACK;
|
|
}}
|
|
|
|
output = list->last;
|
|
|
|
if (list->node_count == 1) {{
|
|
*list = ({Ttitle}List){{0}};
|
|
goto RETURN_{Tupper}_LIST_POP_BACK;
|
|
}}
|
|
|
|
--(list->node_count);
|
|
list->last = output->prev;
|
|
|
|
output->prev = output->next = NULL;
|
|
|
|
RETURN_{Tupper}_LIST_POP_BACK:
|
|
return output;
|