diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-04-29 01:46:12 +0200 |
---|---|---|
committer | Colin Guthrie <cguthrie@mandriva.org> | 2009-06-08 22:31:51 +0100 |
commit | ad2d9386518c851d8ebfae6f8e02ac81679957e3 (patch) | |
tree | ecc18a04e9f08ced1e4724e30fa8fd01fabbbec2 | |
parent | 0660bc2dbd9c77792b6f42fea507b4cd8b4e860b (diff) |
idxset: add enumeration macro PA_IDXSET_FOREACH
-rw-r--r-- | src/pulsecore/idxset.h | 4 |
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 |