Changeset 2090
- Timestamp:
- 06/03/09 17:20:19 (15 months ago)
- Location:
- trunk/slv2
- Files:
-
- 4 modified
-
src/plugin.c (modified) (1 diff)
-
src/slv2_internal.h (modified) (1 diff)
-
src/world.c (modified) (3 diffs)
-
utils/lv2_inspect.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/slv2/src/plugin.c
r2089 r2090 196 196 if (!p->storage) { 197 197 assert(!p->rdf); 198 p->storage = librdf_new_storage(p->world->world, "trees", NULL, NULL); 199 if (!p->storage) 200 p->storage = librdf_new_storage(p->world->world, "memory", NULL, NULL); 198 p->storage = slv2_world_new_storage(p->world); 201 199 p->rdf = librdf_new_model(p->world->world, p->storage, NULL); 202 200 } -
trunk/slv2/src/slv2_internal.h
r2089 r2090 166 166 slv2_world_load_file(SLV2World world, librdf_uri* file_uri); 167 167 168 librdf_storage* 169 slv2_world_new_storage(SLV2World world); 170 168 171 169 172 /* ********* Plugin UI ********* */ -
trunk/slv2/src/world.c
r2086 r2090 43 43 assert(world->world); 44 44 45 world->storage = librdf_new_storage(world->world, "trees", NULL, NULL); 46 if (!world->storage) { 47 SLV2_WARN("Warning: Unable to create \"trees\" RDF storage.\n" 48 "Performance can be improved by upgrading librdf.\n"); 49 world->storage = librdf_new_storage(world->world, "hashes", NULL, 50 "hash-type='memory'"); 51 } 52 45 world->storage = slv2_world_new_storage(world); 53 46 if (!world->storage) 54 47 goto fail; … … 89 82 /* keep on rockin' in the */ free(world); 90 83 return NULL; 84 } 85 86 87 /* private */ 88 librdf_storage* 89 slv2_world_new_storage(SLV2World world) 90 { 91 static bool warned = false; 92 librdf_hash* options = librdf_new_hash_from_string(world->world, NULL, 93 "index-spo='yes',index-ops='yes'"); 94 librdf_storage* ret = librdf_new_storage_with_options( 95 world->world, "trees", NULL, options); 96 if (!ret) { 97 warned = true; 98 SLV2_WARN("Warning: Unable to create \"trees\" RDF storage.\n" 99 "Performance can be improved by upgrading librdf.\n"); 100 ret = librdf_new_storage(world->world, "hashes", NULL, 101 "hash-type='memory'"); 102 } 103 104 librdf_free_hash(options); 105 return ret; 91 106 } 92 107 … … 186 201 187 202 /* Parse the manifest into a temporary model */ 188 librdf_storage* manifest_storage = librdf_new_storage(world->world, "trees", NULL, NULL); 189 if (manifest_storage == NULL) 190 manifest_storage = librdf_new_storage(world->world, "memory", NULL, NULL); 203 librdf_storage* manifest_storage = slv2_world_new_storage(world); 191 204 192 205 librdf_model* manifest_model = librdf_new_model(world->world, -
trunk/slv2/utils/lv2_inspect.c
r2087 r2090 227 227 SLV2Value name = slv2_results_get_binding_value(presets, 0); 228 228 printf("\t %s\n", slv2_value_as_string(name)); 229 slv2_value_free(name); 229 230 } 230 231 slv2_results_free(presets);
