list_peek_tail function <BLOC/list.h>

The list_peek_tail function peeks at (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_peek_tail(
	List *list
);

Parameters

list

A pointer to a List object.

Return value

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