aboutsummaryrefslogtreecommitdiffstats
path: root/src/archive_list.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-06-12 20:50:51 +0200
committerMax Kellermann <max@duempel.org>2012-06-12 20:58:43 +0200
commit9ebbdb9b0b288164ce956ba34bc0c38f94868110 (patch)
tree28fd0142cd2de09b6c49482d8ee3cd140201ec06 /src/archive_list.h
parent48da345e79a0b690aa7d6d59ba8b50875988243b (diff)
downloadmpd-9ebbdb9b0b288164ce956ba34bc0c38f94868110.tar.gz
mpd-9ebbdb9b0b288164ce956ba34bc0c38f94868110.tar.xz
mpd-9ebbdb9b0b288164ce956ba34bc0c38f94868110.zip
archive_list: add _for_each() macros
Diffstat (limited to 'src/archive_list.h')
-rw-r--r--src/archive_list.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/archive_list.h b/src/archive_list.h
index b65245ce9..ec2ccc1e1 100644
--- a/src/archive_list.h
+++ b/src/archive_list.h
@@ -24,6 +24,14 @@
struct archive_plugin;
+extern const struct archive_plugin *const archive_plugins[];
+
+#define archive_plugins_for_each(plugin) \
+ for (const struct archive_plugin *plugin, \
+ *const*archive_plugin_iterator = &archive_plugins[0]; \
+ (plugin = *archive_plugin_iterator) != NULL; \
+ ++archive_plugin_iterator)
+
/* interface for using plugins */
const struct archive_plugin *