forked from external/yambar
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)); \
|
tll_remove((list), (it)); \
|
||||||
} while (0)
|
} 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:
|
* Removes the first element from the list, and returns it (note:
|
||||||
* returns the *actual* item, not an iterator.
|
* returns the *actual* item, not an iterator.
|
||||||
|
|
Loading…
Add table
Reference in a new issue