diff options
author | David Robillard <d@drobilla.net> | 2011-02-11 18:15:18 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-02-11 18:15:18 +0000 |
commit | 4861238c1624a193e30fc0aa78438b4977dbeb82 (patch) | |
tree | 3a740862ccb973833e4c2638010d4bbe00ac0a67 /src/plugin.c | |
parent | 9749ab338c735f777be4fe6dc89082ea30044df1 (diff) | |
download | lilv-4861238c1624a193e30fc0aa78438b4977dbeb82.tar.gz lilv-4861238c1624a193e30fc0aa78438b4977dbeb82.tar.bz2 lilv-4861238c1624a193e30fc0aa78438b4977dbeb82.zip |
Use GSequence for collections with get_by_uri search methods.
Avoid constant sorting during plugin discovery.
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2919 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/plugin.c')
-rw-r--r-- | src/plugin.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugin.c b/src/plugin.c index 2bdae5c..279c657 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -102,7 +102,7 @@ slv2_plugin_query_node(SLV2Plugin p, SLV2Node subject, SLV2Node predicate) SLV2Node node = slv2_match_object(results); SLV2Value value = slv2_value_new_from_node(p->world, node); if (value) - g_ptr_array_add(result, value); + slv2_array_append(result, value); } slv2_match_end(results); @@ -246,7 +246,7 @@ slv2_plugin_load_ports_if_necessary(SLV2Plugin p) FOREACH_MATCH(types) { SLV2Node type = slv2_match_object(types); if (sord_node_get_type(type) == SORD_URI) { - g_ptr_array_add( + slv2_array_append( this_port->classes, slv2_value_new_from_node(p->world, type)); } else { @@ -637,9 +637,9 @@ slv2_plugin_get_supported_features(SLV2Plugin p) unsigned n_optional = slv2_values_size(optional); unsigned n_required = slv2_values_size(required); for (unsigned i = 0 ; i < n_optional; ++i) - g_ptr_array_add(result, slv2_values_get_at(optional, i)); + slv2_array_append(result, slv2_values_get_at(optional, i)); for (unsigned i = 0 ; i < n_required; ++i) - g_ptr_array_add(result, slv2_values_get_at(required, i)); + slv2_array_append(result, slv2_values_get_at(required, i)); if (optional) { free(((GPtrArray*)optional)->pdata); @@ -797,7 +797,7 @@ slv2_plugin_get_uis(SLV2Plugin p) type, binary); - g_ptr_array_add(result, slv2_ui); + slv2_sequence_insert(result, slv2_ui); } slv2_match_end(uis); |