diff options
author | David Robillard <d@drobilla.net> | 2011-03-09 18:11:40 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-03-09 18:11:40 +0000 |
commit | 027ca551e53800ab7a2cd8375d1cacb980803d75 (patch) | |
tree | 5dcd8281dcc4f83ddc07fc047656b57b3d12b74e /src/world.c | |
parent | 97304fcdaa125bf1bfec30fa0d92b619faa41ea2 (diff) | |
download | lilv-027ca551e53800ab7a2cd8375d1cacb980803d75.tar.gz lilv-027ca551e53800ab7a2cd8375d1cacb980803d75.tar.bz2 lilv-027ca551e53800ab7a2cd8375d1cacb980803d75.zip |
New collections and iterator API.
Deprecate slv2_*_get_at.
Remove slv2_world_get_plugins_by_filter.
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@3057 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/world.c')
-rw-r--r-- | src/world.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/world.c b/src/world.c index 3749f1f..97539c0 100644 --- a/src/world.c +++ b/src/world.c @@ -154,13 +154,8 @@ slv2_world_free(SLV2World world) slv2_value_free(world->doap_name_val); slv2_value_free(world->lv2_name_val); -#define SLV2_FOREACH(iter, seq) \ - for (GSequenceIter* (iter) = g_sequence_get_begin_iter(seq); \ - (iter) != g_sequence_get_end_iter(seq); \ - (iter) = g_sequence_iter_next(iter)) - SLV2_FOREACH(i, world->plugins) { - SLV2Plugin p = g_sequence_get(i); + SLV2Plugin p = slv2_plugins_get(world->plugins, i); slv2_plugin_free(p); } g_sequence_free(world->plugins); @@ -692,22 +687,6 @@ slv2_world_get_all_plugins(SLV2World world) } SLV2_API -SLV2Plugins -slv2_world_get_plugins_by_filter(SLV2World world, bool (*include)(SLV2Plugin)) -{ - SLV2Plugins result = slv2_plugins_new(); - - const unsigned n = slv2_plugins_size(world->plugins); - for (unsigned i = 0; i < n; ++i) { - SLV2Plugin p = slv2_plugins_get_at(world->plugins, i); - if (include(p)) - slv2_sequence_insert(result, p); - } - - return result; -} - -SLV2_API SLV2Plugin slv2_world_get_plugin_by_uri_string(SLV2World world, const char* uri) |