summaryrefslogtreecommitdiffstats
path: root/src/plugin.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-02-04 02:44:07 +0000
committerDavid Robillard <d@drobilla.net>2011-02-04 02:44:07 +0000
commitcc61578f0f1417aba3c6d147d164bc644541372b (patch)
treedae833664026ff4de6e158ce4b4f038cbd8d18cd /src/plugin.c
parentb0c49632a5ee21d4ea35d0ae6160910fd35d68f3 (diff)
downloadlilv-cc61578f0f1417aba3c6d147d164bc644541372b.tar.gz
lilv-cc61578f0f1417aba3c6d147d164bc644541372b.tar.bz2
lilv-cc61578f0f1417aba3c6d147d164bc644541372b.zip
Replace use of raptor (for raptor_sequence) with glib.
SLV2 now depends only on serd, sord, and glib. git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2903 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/plugin.c')
-rw-r--r--src/plugin.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/plugin.c b/src/plugin.c
index 3244692..aa4a7a4 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -112,7 +112,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)
- raptor_sequence_push(result, value);
+ g_ptr_array_add(result, value);
}
slv2_match_end(results);
@@ -207,7 +207,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) {
- raptor_sequence_push(
+ g_ptr_array_add(
this_port->classes,
slv2_value_new_from_node(p->world, type));
} else {
@@ -651,14 +651,13 @@ slv2_plugin_get_supported_features(SLV2Plugin p)
SLV2Values result = slv2_values_new();
unsigned n_optional = slv2_values_size(optional);
unsigned n_required = slv2_values_size(required);
- unsigned i = 0;
- for ( ; i < n_optional; ++i)
- slv2_values_set_at(result, i, raptor_sequence_pop(optional));
- for ( ; i < n_optional + n_required; ++i)
- slv2_values_set_at(result, i, raptor_sequence_pop(required));
+ for (unsigned i = 0 ; i < n_optional; ++i)
+ g_ptr_array_add(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_values_free(optional);
- slv2_values_free(required);
+ free(((GPtrArray*)optional)->pdata);
+ free(((GPtrArray*)required)->pdata);
return result;
}
@@ -801,7 +800,7 @@ slv2_plugin_get_uis(SLV2Plugin p)
type,
binary);
- raptor_sequence_push(result, slv2_ui);
+ g_ptr_array_add(result, slv2_ui);
}
slv2_match_end(uis);