From 1e0c225b5728990bb0c96cd1297523e35e6646b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 10 Feb 2019 15:41:55 +0100 Subject: Fix linked_list RESET. --- linked_list.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'linked_list.h') diff --git a/linked_list.h b/linked_list.h index 35e90d9e..4e9ca042 100644 --- a/linked_list.h +++ b/linked_list.h @@ -55,6 +55,10 @@ int APPEND(LLIST(TYPE)) ( LLIST(TYPE)* dest, LLIST(TYPE)* new ); int SIZE(LLIST(TYPE)) ( LLIST(TYPE)* llist ); int EMPTY(LLIST(TYPE)) ( LLIST(TYPE)* llist ); +/* + * Resets a linked list by removing all it's objects. + * FREE's all elements stored in the list. + */ int RESET(LLIST(TYPE)) ( LLIST(TYPE)* llist ); LLIST(TYPE)* RESOLVE(LLIST(TYPE)) (LLIST(TYPE)* dest, LLIST(TYPE)* new); -- cgit v1.2.3