aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist_list.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-06-12 22:12:06 +0200
committerMax Kellermann <max@duempel.org>2012-06-12 22:12:06 +0200
commit5665de5ee7282801da54de36f9b1212bc173dede (patch)
treea39559a03847eedec238d15bfb99f07b1de0a016 /src/playlist_list.h
parentd5b9be03938a5081d65adf71b15de0899f7ce103 (diff)
downloadmpd-5665de5ee7282801da54de36f9b1212bc173dede.tar.gz
mpd-5665de5ee7282801da54de36f9b1212bc173dede.tar.xz
mpd-5665de5ee7282801da54de36f9b1212bc173dede.zip
playlist_list: add _for_each() macros
Diffstat (limited to 'src/playlist_list.h')
-rw-r--r--src/playlist_list.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/playlist_list.h b/src/playlist_list.h
index 3710589a2..08e8cbd76 100644
--- a/src/playlist_list.h
+++ b/src/playlist_list.h
@@ -25,6 +25,14 @@
struct playlist_provider;
struct input_stream;
+extern const struct playlist_plugin *const playlist_plugins[];
+
+#define playlist_plugins_for_each(plugin) \
+ for (const struct playlist_plugin *plugin, \
+ *const*playlist_plugin_iterator = &playlist_plugins[0]; \
+ (plugin = *playlist_plugin_iterator) != NULL; \
+ ++playlist_plugin_iterator)
+
/**
* Initializes all playlist plugins.
*/