aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-02-10 22:40:09 +0000
committerDavid Robillard <d@drobilla.net>2011-02-10 22:40:09 +0000
commit05a25de591ed61bb4c60c9c93d56fb6ad78a2141 (patch)
tree799a8aed334a51c28f7037ec0447669e0573a8f0 /src/node.c
parent05ea9fdadeeb3973998e4c00f5de4834dc2432d3 (diff)
downloadserd-05a25de591ed61bb4c60c9c93d56fb6ad78a2141.tar.gz
serd-05a25de591ed61bb4c60c9c93d56fb6ad78a2141.tar.bz2
serd-05a25de591ed61bb4c60c9c93d56fb6ad78a2141.zip
Add serd_node_new_uri_from_string.
git-svn-id: http://svn.drobilla.net/serd/trunk@98 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/node.c b/src/node.c
index 005e9a01..1cf24891 100644
--- a/src/node.c
+++ b/src/node.c
@@ -76,9 +76,18 @@ serd_node_new_uri_from_node(const SerdNode* uri_node,
const SerdURI* base,
SerdURI* out)
{
+ return serd_node_new_uri_from_string(uri_node->buf, base, out);
+}
+
+SERD_API
+SerdNode
+serd_node_new_uri_from_string(const uint8_t* str,
+ const SerdURI* base,
+ SerdURI* out)
+{
// Parse (possibly relative) URI
SerdURI uri;
- if (serd_uri_parse(uri_node->buf, &uri)) {
+ if (serd_uri_parse(str, &uri)) {
return serd_node_new_uri(&uri, base, out);
}
return SERD_NODE_NULL;