tllist: add head/tail accessors

This commit is contained in:
Daniel Eklöf 2018-12-15 11:46:20 +01:00
parent c67234e34f
commit ee156c8dc7

View file

@ -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.