birkch / rpms / pulseaudio

Forked from rpms/pulseaudio 3 years ago
Clone
Blob Blame History Raw
From 5d39b8d22d4cce197778d8ef554a88c4be116f92 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 29 Apr 2009 01:46:12 +0200
Subject: [PATCH] idxset: add enumeration macro PA_IDXSET_FOREACH

---
 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 7531ea3..6b9ff47 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
-- 
1.6.2.2