summaryrefslogtreecommitdiffstats
path: root/src/plugin.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-05-11 23:31:28 +0000
committerDavid Robillard <d@drobilla.net>2011-05-11 23:31:28 +0000
commit7ad607b432e1fac40a62ed28bc9ddeb044153fa5 (patch)
tree4352e04c1da1b48a78f10401df1b7435b74a4961 /src/plugin.c
parent3cf7be0e7ad6cd9aaa0707a9d30fb9a78bef03d8 (diff)
downloadlilv-7ad607b432e1fac40a62ed28bc9ddeb044153fa5.tar.gz
lilv-7ad607b432e1fac40a62ed28bc9ddeb044153fa5.tar.bz2
lilv-7ad607b432e1fac40a62ed28bc9ddeb044153fa5.zip
Pass environment to sord write methods for CURIE abbreviation.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3255 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/plugin.c')
-rw-r--r--src/plugin.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugin.c b/src/plugin.c
index 5c36180..c8cf9c5 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -117,10 +117,13 @@ lilv_plugin_load(LilvPlugin* p)
// Parse all the plugin's data files into RDF model
LILV_FOREACH(nodes, i, p->data_uris) {
const LilvNode* data_uri_val = lilv_nodes_get(p->data_uris, i);
+ SerdEnv* env = serd_env_new();
sord_read_file(p->world->model,
+ env,
sord_node_get_string(data_uri_val->val.uri_val),
p->bundle_uri->val.uri_val,
lilv_world_blank_node_prefix(p->world));
+ serd_env_free(env);
}
#ifdef LILV_DYN_MANIFEST
@@ -150,11 +153,14 @@ lilv_plugin_load(LilvPlugin* p)
FILE* fd = tmpfile();
get_data_func(handle, fd, lilv_node_as_string(p->plugin_uri));
rewind(fd);
+ SerdEnv* env = serd_env_new();
sord_read_file_handle(p->world->model,
+ env,
fd,
(const uint8_t*)lilv_node_as_uri(p->dynman_uri),
p->bundle_uri->val.uri_val,
lilv_world_blank_node_prefix(p->world));
+ serd_env_free(env);
fclose(fd);
}