From ee156c8dc7067765b9fbbd7993ac5f08ad0cfe8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 15 Dec 2018 11:46:20 +0100 Subject: [PATCH] tllist: add head/tail accessors --- tllist.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tllist.h b/tllist.h index 7b5b3d1..ea37b4a 100644 --- a/tllist.h +++ b/tllist.h @@ -124,6 +124,9 @@ tll_remove((list), (it)); \ } while (0) +#define tll_front(list) (list).head->item +#define tll_back(list) (list).tail->item + /* * Removes the first element from the list, and returns it (note: * returns the *actual* item, not an iterator.