summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/llist.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore/llist.h')
-rw-r--r--src/pulsecore/llist.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pulsecore/llist.h b/src/pulsecore/llist.h
index 77a1749f..43d1fbee 100644
--- a/src/pulsecore/llist.h
+++ b/src/pulsecore/llist.h
@@ -104,4 +104,10 @@
} \
} while (0)
+#define PA_LLIST_FOREACH(i,head) \
+ for (i = (head); i; i = i->next)
+
+#define PA_LLIST_FOREACH_FOR_DELETE(i,n,head) \
+ for (i = (head), n = i ? i->next : NULL; i; i = n, n = i ? i ->next : NULL)
+
#endif