diff options
author | David Robillard <d@drobilla.net> | 2008-05-03 23:26:56 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-05-03 23:26:56 +0000 |
commit | 3f69656ed2a8dee9f5a67041daa8b27e2cd13895 (patch) | |
tree | 779283f369655aefc72ed25736e42c6d06185f1a | |
parent | a2706dd069fde845e8a6f2d46112db7c1727a0db (diff) | |
download | lilv-3f69656ed2a8dee9f5a67041daa8b27e2cd13895.tar.gz lilv-3f69656ed2a8dee9f5a67041daa8b27e2cd13895.tar.bz2 lilv-3f69656ed2a8dee9f5a67041daa8b27e2cd13895.zip |
Parse files directly into "world" model instead of into a temporary model, then copying.
git-svn-id: http://svn.drobilla.net/lad/slv2@1196 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/plugin.c | 3 | ||||
-rw-r--r-- | src/world.c | 14 |
2 files changed, 2 insertions, 15 deletions
diff --git a/src/plugin.c b/src/plugin.c index 6e3d94e..1479bc6 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -234,6 +234,7 @@ slv2_plugin_load(SLV2Plugin p) librdf_query_results_next(results); } + // Not necessary due to ORDER BY clause //raptor_sequence_sort(p->ports, slv2_port_compare_by_index); librdf_free_query_results(results); @@ -261,8 +262,6 @@ slv2_plugin_load(SLV2Plugin p) librdf_free_query_results(results); librdf_free_query(q); - - //printf("%p %s: NUM PORTS: %d\n", (void*)p, p->plugin_uri, slv2_plugin_get_num_ports(p)); } diff --git a/src/world.c b/src/world.c index 01201fb..1d2f339 100644 --- a/src/world.c +++ b/src/world.c @@ -197,19 +197,7 @@ slv2_world_free(SLV2World world) void slv2_world_load_file(SLV2World world, librdf_uri* file_uri) { - librdf_storage* storage = librdf_new_storage(world->world, - "memory", NULL, NULL); - librdf_model* model = librdf_new_model(world->world, - storage, NULL); - librdf_parser_parse_into_model(world->parser, file_uri, NULL, - model); - - librdf_stream* stream = librdf_model_as_stream(model); - librdf_model_add_statements(world->model, stream); - librdf_free_stream(stream); - - librdf_free_model(model); - librdf_free_storage(storage); + librdf_parser_parse_into_model(world->parser, file_uri, NULL, world->model); } |