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

View File

@ -84,5 +84,10 @@ twc_list_get(struct t_twc_list *list, size_t index);
item; \ item; \
item = item->next_item, ++index) 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 #endif // TOX_WEECHAT_LIST_H