From 6ac6d7448aa0a976e7347daf8b48d6e56216af85 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 5 May 2014 15:38:33 +0000 Subject: Fix use of lv2info -m and -p options to write plugin data. git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5401 a436a847-0d15-0410-975c-d299462d15a1 --- src/node.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/node.c') diff --git a/src/node.c b/src/node.c index e8756ac..3d074a4 100644 --- a/src/node.c +++ b/src/node.c @@ -154,6 +154,20 @@ lilv_new_uri(LilvWorld* world, const char* uri) return lilv_node_new(world, LILV_VALUE_URI, uri); } +LILV_API +LilvNode* +lilv_new_file_uri(LilvWorld* world, const char* host, const char* path) +{ + char* abs_path = lilv_path_absolute(path); + SerdNode s = serd_node_new_file_uri( + (const uint8_t*)abs_path, (const uint8_t*)host, NULL, true); + + LilvNode* ret = lilv_node_new(world, LILV_VALUE_URI, (const char*)s.buf); + serd_node_free(&s); + free(abs_path); + return ret; +} + LILV_API LilvNode* lilv_new_string(LilvWorld* world, const char* str) -- cgit v1.2.1