summaryrefslogtreecommitdiffstats
path: root/src/query.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-01-31 01:34:19 +0000
committerDavid Robillard <d@drobilla.net>2011-01-31 01:34:19 +0000
commit15f9b09510615f1732e7eb043ac587673b4edc4a (patch)
tree7dde76127c8b274bbb55f27e2c01cbe2476d3779 /src/query.c
parentd716c6d5e7c622d238d460a32ad7d02845fbc4d4 (diff)
downloadlilv-15f9b09510615f1732e7eb043ac587673b4edc4a.tar.gz
lilv-15f9b09510615f1732e7eb043ac587673b4edc4a.tar.bz2
lilv-15f9b09510615f1732e7eb043ac587673b4edc4a.zip
Reduce heavy use of librdf_new_node_from* functions.
Store a librdf_node, rather than a librdf_uri, for a URI SLV2Value (further reducing the use of librdf_uri). git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2882 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/query.c')
-rw-r--r--src/query.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/query.c b/src/query.c
index ac49ece..e7f6565 100644
--- a/src/query.c
+++ b/src/query.c
@@ -37,7 +37,10 @@ slv2_plugin_find_statements(SLV2Plugin plugin,
{
slv2_plugin_load_if_necessary(plugin);
librdf_statement* q = librdf_new_statement_from_nodes(
- plugin->world->world, subject, predicate, object);
+ plugin->world->world,
+ subject ? librdf_new_node_from_node(subject) : NULL,
+ predicate ? librdf_new_node_from_node(predicate) : NULL,
+ object ? librdf_new_node_from_node(object) : NULL);
librdf_stream* results = librdf_model_find_statements(plugin->rdf, q);
librdf_free_statement(q);
return results;