diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugin.c | 10 | ||||
-rw-r--r-- | src/slv2_internal.h | 4 | ||||
-rw-r--r-- | src/value.c | 2 | ||||
-rw-r--r-- | src/world.c | 50 |
4 files changed, 35 insertions, 31 deletions
diff --git a/src/plugin.c b/src/plugin.c index c8292cb..2a4abe3 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -379,7 +379,7 @@ slv2_plugin_get_class(SLV2Plugin p) SLV2PluginClass plugin_class = slv2_plugin_classes_get_by_uri( p->world->plugin_classes, class); - librdf_free_node(class_node); + slv2_node_free(class_node); if (plugin_class) { p->plugin_class = plugin_class; @@ -500,7 +500,7 @@ slv2_plugin_get_value_by_qname_i18n(SLV2Plugin p, pred_node, NULL); - librdf_free_node(pred_node); + slv2_node_free(pred_node); free(pred_uri); return slv2_values_from_stream_i18n(p, results); } @@ -756,7 +756,7 @@ slv2_plugin_get_author(SLV2Plugin p) doap_maintainer, NULL); - librdf_free_node(doap_maintainer); + slv2_node_free(doap_maintainer); if (slv2_matches_end(maintainers)) { return NULL; @@ -835,7 +835,7 @@ slv2_plugin_get_uis(SLV2Plugin p) SLV2Value binary = slv2_plugin_get_unique( p, ui, ui_binary_node); - librdf_free_node(ui_binary_node); + slv2_node_free(ui_binary_node); if (!librdf_node_is_resource(ui) || !slv2_value_is_uri(type) @@ -856,7 +856,7 @@ slv2_plugin_get_uis(SLV2Plugin p) } END_MATCH(uis); - librdf_free_node(ui_ui); + slv2_node_free(ui_ui); if (slv2_uis_size(result) > 0) { return result; diff --git a/src/slv2_internal.h b/src/slv2_internal.h index b4e919b..b05ea25 100644 --- a/src/slv2_internal.h +++ b/src/slv2_internal.h @@ -263,6 +263,10 @@ static inline librdf_node* slv2_node_copy(librdf_node* node) { return librdf_new_node_from_node(node); } +static inline void slv2_node_free(librdf_node* node) { + librdf_free_node(node); +} + /* ********* Values ********* */ void slv2_values_set_at(SLV2Values list, unsigned index, void* value); diff --git a/src/value.c b/src/value.c index 59b3605..f2f15b8 100644 --- a/src/value.c +++ b/src/value.c @@ -221,7 +221,7 @@ slv2_value_free(SLV2Value val) { if (val) { if (val->type == SLV2_VALUE_URI) - librdf_free_node(val->val.uri_val); + slv2_node_free(val->val.uri_val); else free(val->str_val); diff --git a/src/world.c b/src/world.c index 3260419..652d3f9 100644 --- a/src/world.c +++ b/src/world.c @@ -163,28 +163,28 @@ slv2_world_free(SLV2World world) slv2_plugin_class_free(world->lv2_plugin_class); world->lv2_plugin_class = NULL; - librdf_free_node(world->dyn_manifest_node); - librdf_free_node(world->lv2_specification_node); - librdf_free_node(world->lv2_plugin_node); - librdf_free_node(world->lv2_binary_node); - librdf_free_node(world->lv2_default_node); - librdf_free_node(world->lv2_minimum_node); - librdf_free_node(world->lv2_maximum_node); - librdf_free_node(world->lv2_port_node); - librdf_free_node(world->lv2_portproperty_node); - librdf_free_node(world->lv2_reportslatency_node); - librdf_free_node(world->lv2_index_node); - librdf_free_node(world->lv2_symbol_node); - librdf_free_node(world->rdf_a_node); - librdf_free_node(world->rdf_value_node); - librdf_free_node(world->rdfs_label_node); - librdf_free_node(world->rdfs_seealso_node); - librdf_free_node(world->rdfs_subclassof_node); - librdf_free_node(world->rdfs_class_node); - librdf_free_node(world->slv2_bundleuri_node); - librdf_free_node(world->slv2_dmanifest_node); - librdf_free_node(world->xsd_integer_node); - librdf_free_node(world->xsd_decimal_node); + slv2_node_free(world->dyn_manifest_node); + slv2_node_free(world->lv2_specification_node); + slv2_node_free(world->lv2_plugin_node); + slv2_node_free(world->lv2_binary_node); + slv2_node_free(world->lv2_default_node); + slv2_node_free(world->lv2_minimum_node); + slv2_node_free(world->lv2_maximum_node); + slv2_node_free(world->lv2_port_node); + slv2_node_free(world->lv2_portproperty_node); + slv2_node_free(world->lv2_reportslatency_node); + slv2_node_free(world->lv2_index_node); + slv2_node_free(world->lv2_symbol_node); + slv2_node_free(world->rdf_a_node); + slv2_node_free(world->rdf_value_node); + slv2_node_free(world->rdfs_label_node); + slv2_node_free(world->rdfs_seealso_node); + slv2_node_free(world->rdfs_subclassof_node); + slv2_node_free(world->rdfs_class_node); + slv2_node_free(world->slv2_bundleuri_node); + slv2_node_free(world->slv2_dmanifest_node); + slv2_node_free(world->xsd_integer_node); + slv2_node_free(world->xsd_decimal_node); for (int i=0; i < raptor_sequence_size(world->plugins); ++i) slv2_plugin_free(raptor_sequence_get_at(world->plugins, i)); @@ -580,8 +580,8 @@ slv2_world_load_plugin_classes(SLV2World world) class_node, (const char*)label)); - librdf_free_node(parent_node); - librdf_free_node(label_node); + slv2_node_free(parent_node); + slv2_node_free(label_node); } END_MATCH(classes); } @@ -720,7 +720,7 @@ slv2_world_load_all(SLV2World world) } END_MATCH(files); - librdf_free_node(bundle_node); + slv2_node_free(bundle_node); } END_MATCH(plugins); } |