diff options
author | David Robillard <d@drobilla.net> | 2011-01-31 00:33:19 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-01-31 00:33:19 +0000 |
commit | 8ab85a31c348a40858752a035a14ccb6df5fd6c2 (patch) | |
tree | 972c310181913bfb92776bc655cbbfa2e895eddb /src/value.c | |
parent | a81b9cdaa2c8d6cf4fcef2472ac0dfa2ca7e47e9 (diff) | |
download | lilv-8ab85a31c348a40858752a035a14ccb6df5fd6c2.tar.gz lilv-8ab85a31c348a40858752a035a14ccb6df5fd6c2.tar.bz2 lilv-8ab85a31c348a40858752a035a14ccb6df5fd6c2.zip |
Replace a bunch of explicit use of librdf_uri (which does not have a Sord equivalent) with librdf_node (which does).
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2880 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/value.c')
-rw-r--r-- | src/value.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/value.c b/src/value.c index 819e5fe..4799186 100644 --- a/src/value.c +++ b/src/value.c @@ -104,7 +104,7 @@ slv2_value_new_librdf_node(SLV2World world, librdf_node* node) switch (librdf_node_get_type(node)) { case LIBRDF_NODE_TYPE_RESOURCE: type = SLV2_VALUE_URI; - result = slv2_value_new_librdf_uri(world, librdf_node_get_uri(node)); + result = slv2_value_new_librdf_uri(world, node); break; case LIBRDF_NODE_TYPE_LITERAL: datatype_uri = librdf_node_get_literal_value_datatype_uri(node); @@ -144,8 +144,11 @@ slv2_value_new_librdf_node(SLV2World world, librdf_node* node) /* private */ SLV2Value -slv2_value_new_librdf_uri(SLV2World world, librdf_uri* uri) +slv2_value_new_librdf_uri(SLV2World world, librdf_node* node) { + assert(node); + assert(librdf_node_is_resource(node)); + librdf_uri* uri = librdf_node_get_uri(node); assert(uri); SLV2Value val = (SLV2Value)malloc(sizeof(struct _SLV2Value)); val->type = SLV2_VALUE_URI; |