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/query.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/query.c')
-rw-r--r-- | src/query.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/query.c b/src/query.c index 9382fdc..4e60b41 100644 --- a/src/query.c +++ b/src/query.c @@ -94,13 +94,13 @@ slv2_values_from_stream_objects_i18n(SLV2Plugin p, if (lm == SLV2_LANG_MATCH_EXACT) { // Exact language match, add to results - g_ptr_array_add(values, slv2_value_new_from_node(p->world, value)); + slv2_array_append(values, slv2_value_new_from_node(p->world, value)); } else if (lm == SLV2_LANG_MATCH_PARTIAL) { // Partial language match, save in case we find no exact partial = value; } } else { - g_ptr_array_add(values, slv2_value_new_from_node(p->world, value)); + slv2_array_append(values, slv2_value_new_from_node(p->world, value)); } } slv2_match_end(stream); @@ -121,7 +121,7 @@ slv2_values_from_stream_objects_i18n(SLV2Plugin p, } if (best) { - g_ptr_array_add(values, slv2_value_new_from_node(p->world, best)); + slv2_array_append(values, slv2_value_new_from_node(p->world, best)); } else { // No matches whatsoever slv2_values_free(values); @@ -143,7 +143,7 @@ slv2_values_from_stream_objects(SLV2Plugin p, } else { SLV2Values values = slv2_values_new(); FOREACH_MATCH(stream) { - g_ptr_array_add( + slv2_array_append( values, slv2_value_new_from_node( p->world, |