X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Finclude%2Fwine%2Flist.h;h=ce4c968595af2a23efbe9c69b129cbfb6347ab7f;hp=8f4d61de83e74f9dfffc6e6b837f576d1cefb4cb;hb=16cc7e9f01d583e8d8131f32cd5ef2b12d36989d;hpb=5c75d1e001e6aa23fc078ff118f6204172499874 diff --git a/reactos/include/wine/list.h b/reactos/include/wine/list.h index 8f4d61de83e..ce4c968595a 100644 --- a/reactos/include/wine/list.h +++ b/reactos/include/wine/list.h @@ -155,6 +155,13 @@ inline static void list_init( struct list *list ) &(elem)->field != (list); \ (elem) = LIST_ENTRY((elem)->field.next, type, field)) +#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field) \ + for ((cursor) = LIST_ENTRY((list)->next, type, field), \ + (cursor2) = LIST_ENTRY((cursor)->field.next, type, field); \ + &(cursor)->field != (list); \ + (cursor) = (cursor2), \ + (cursor2) = LIST_ENTRY((cursor)->field.next, type, field)) + /* macros for statically initialized lists */ #define LIST_INIT(list) { &(list), &(list) }