mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-20 03:35:41 +02:00
tllist: add head/tail accessors
This commit is contained in:
parent
c67234e34f
commit
ee156c8dc7
1 changed files with 3 additions and 0 deletions
3
tllist.h
3
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.
|
||||
|
|
Loading…
Add table
Reference in a new issue