list_pop_tail function <BLOC/list.h>

The list_pop_tail function pops (removes and returns a reference to) the last item from a list. This function can be used to treat a list like a stack.

Syntax

void *
list_pop_tail(
	List *list
);

Parameters

list

A pointer to a List object.

Return value

A reference to the removed item. If the list was empty, the function returns NULL.