Add reverse foreach for lists

This commit is contained in:
Kevin Lange 2014-06-01 12:56:55 -07:00
parent 99ca785025
commit fb49a12728

View File

@ -47,5 +47,6 @@ void list_append_before(list_t * list, node_t * after, node_t * node);
node_t * list_insert_before(list_t * list, node_t * after, void * item);
#define foreach(i, list) for (node_t * i = list->head; i != NULL; i = i->next)
#define foreachr(i, list) for (node_t * i = list->tail; i != NULL; i = i->prev)
#endif