Added twc_list_foreach_reverse.

This commit is contained in:
Håvard Pettersson 2014-10-12 12:58:45 +02:00
parent 3ef7cde92e
commit 666dd36f8d
1 changed files with 5 additions and 0 deletions

View File

@ -84,5 +84,10 @@ twc_list_get(struct t_twc_list *list, size_t index);
item; \
item = item->next_item, ++index)
#define twc_list_foreach_reverse(list, index, item) \
for (item = list->tail, index = list->count - 1; \
item; \
item = item->prev_item, --index)
#endif // TOX_WEECHAT_LIST_H