diff options
author | David Robillard <d@drobilla.net> | 2015-03-07 08:42:56 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-03-07 08:42:56 +0000 |
commit | 1b420b15b3c88ebbcd6789f78b69bd284e0a98f7 (patch) | |
tree | 2871ea66f0651b2a43ff98c6f107e1654ee3aeed /src/world.c | |
parent | cd320a7ccd392a5da2df31ec5edc9b07db5befab (diff) | |
download | lilv-1b420b15b3c88ebbcd6789f78b69bd284e0a98f7.tar.gz lilv-1b420b15b3c88ebbcd6789f78b69bd284e0a98f7.tar.bz2 lilv-1b420b15b3c88ebbcd6789f78b69bd284e0a98f7.zip |
Add support for state deletion.
Add lilv_node_get_path().
Add lilv_state_get_uri().
Add lilv_state_delete().
Fix creation of duplicate manifest entries when saving state.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5617 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/world.c')
-rw-r--r-- | src/world.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/world.c b/src/world.c index 566c862..2855885 100644 --- a/src/world.c +++ b/src/world.c @@ -564,7 +564,7 @@ lilv_world_load_dyn_manifest(LilvWorld* world, #endif // LILV_DYN_MANIFEST } -static LilvNode* +LilvNode* lilv_world_get_manifest_uri(LilvWorld* world, LilvNode* bundle_uri) { SerdNode manifest_uri = lilv_new_uri_relative_to_base( @@ -628,8 +628,7 @@ static int lilv_world_drop_graph(LilvWorld* world, LilvNode* graph) { SordIter* i = sord_search(world->model, NULL, NULL, NULL, graph->node); - while (!sord_iter_end(i) && - sord_node_equals(sord_iter_get_node(i, SORD_GRAPH), graph->node)) { + while (!sord_iter_end(i)) { const SerdStatus st = sord_erase(world->model, i); if (st) { LILV_ERRORF("Error removing statement from <%s> (%s)\n", @@ -657,6 +656,10 @@ lilv_world_unload_file(LilvWorld* world, LilvNode* file) LILV_API int lilv_world_unload_bundle(LilvWorld* world, LilvNode* bundle_uri) { + if (!bundle_uri) { + return 0; + } + // Remove loaded_files entry for manifest.ttl LilvNode* manifest = lilv_world_get_manifest_uri(world, bundle_uri); lilv_world_unload_file(world, manifest); |