summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/idxset.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-04-29 01:46:12 +0200
committerLennart Poettering <lennart@poettering.net>2009-04-29 01:46:12 +0200
commit5d39b8d22d4cce197778d8ef554a88c4be116f92 (patch)
tree42e42ad4c76420b589562bb65fe45a8662d622c3 /src/pulsecore/idxset.h
parent0368d6e22b9d7e6fec2474d158eaec16c90054f5 (diff)
idxset: add enumeration macro PA_IDXSET_FOREACH
Diffstat (limited to 'src/pulsecore/idxset.h')
-rw-r--r--src/pulsecore/idxset.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pulsecore/idxset.h b/src/pulsecore/idxset.h
index 7531ea32..6b9ff472 100644
--- a/src/pulsecore/idxset.h
+++ b/src/pulsecore/idxset.h
@@ -103,4 +103,8 @@ unsigned pa_idxset_size(pa_idxset*s);
/* Return TRUE of the idxset is empty */
pa_bool_t pa_idxset_isempty(pa_idxset *s);
+
+#define PA_IDXSET_FOREACH(e, s, idx) \
+ for ((e) = pa_idxset_first((s), &(idx)); (e); (e) = pa_idxset_next((s), &(idx)))
+
#endif