dl_last()

dl_last()#

Retrieves the last item in a doubly linked list.

Prototype

void *dl_last(dl_list_t *dl);

Parameters

Key

Type

Description

dl

dl_list_t *

Pointer to the doubly linked list.


Return Value

Returns a pointer to the last item in the list, or NULL if the list is empty.

Notes

Ensure that the list is properly initialized before calling dl_last().

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples