Commit 7b3d092c authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

Add a LIST_FOR_EACH_ENTRY list helper.

parent c905d691
......@@ -149,6 +149,12 @@ inline static void list_init( struct list *list )
(cursor) != (list); \
(cursor) = (cursor2), (cursor2) = (cursor)->next)
/* iterate through the list using a list entry */
#define LIST_FOR_EACH_ENTRY(elem, list, type, field) \
for ((elem) = LIST_ENTRY((list)->next, type, field); \
&(elem)->field != (list); \
(elem) = LIST_ENTRY((elem)->field.next, type, field))
/* macros for statically initialized lists */
#define LIST_INIT(list) { &(list), &(list) }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment