mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
Add a LIST_FOR_EACH_ENTRY list helper.
This commit is contained in:
parent
c905d691c8
commit
7b3d092c26
@ -149,6 +149,12 @@ inline static void list_init( struct list *list )
|
|||||||
(cursor) != (list); \
|
(cursor) != (list); \
|
||||||
(cursor) = (cursor2), (cursor2) = (cursor)->next)
|
(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 */
|
/* macros for statically initialized lists */
|
||||||
#define LIST_INIT(list) { &(list), &(list) }
|
#define LIST_INIT(list) { &(list), &(list) }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user