diff options
author | Dave Beckett <dave@dajobe.org> | 2010-01-18 22:10:29 -0800 |
---|---|---|
committer | Dave Beckett <dave@dajobe.org> | 2010-01-18 22:10:29 -0800 |
commit | fb9a7800d441c5e72a203bfc6b6383bca06fe262 (patch) | |
tree | 07e90c2e89aec6d12b3d5d4b4dfc0a03589b6518 /src/raptor_uri.c | |
parent | 0638611ce4728403f3252c2322c096d7fa25ab0b (diff) | |
download | raptor-fb9a7800d441c5e72a203bfc6b6383bca06fe262.tar.gz |
Update rdf namespace concepts to add PlainLiteral, share across parsers
raptor_rdf_ns_term_id gains RDF_NS_PlainLiteral; reordered to put
together with RDF_NS_XMLLiteral, the other datatype.
raptor_world gains an array of pointers to raptor_uri* concepts.
turtle_parser loses nil_uri, first_uri, rest_uri that are now
available via the macros.
rss_parser loses rdf:type and rdf:Seq concept URIs that are now
available via the macros.
Added macros RAPTOR_RDF_{name}_URI(world) to get pointer to static
raptor_uri* for NS terms.
RDF/XML parser cuts down to just 5 DAML NS URIs to manage itself.
(raptor_new_uri_for_rdf_concept): now takes const name.
(raptor_concepts_init, raptor_concepts_finish): Added.
(raptor_world_open): Call raptor_concepts_init; re-order to init URIs
then concepts first.
(raptor_free_world): Call raptor_concepts_finish
Update RDF/XML, RSS and Turtle parsers to use shared URIs.
Diffstat (limited to 'src/raptor_uri.c')
-rw-r--r-- | src/raptor_uri.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/raptor_uri.c b/src/raptor_uri.c index 779bc7a4..8a3cef81 100644 --- a/src/raptor_uri.c +++ b/src/raptor_uri.c @@ -305,7 +305,7 @@ raptor_new_uri_from_id(raptor_world *world, raptor_uri *base_uri, * Return value: a new #raptor_uri object or NULL on failure **/ raptor_uri* -raptor_new_uri_for_rdf_concept(raptor_world* world, const char *name) +raptor_new_uri_for_rdf_concept(raptor_world* world, const unsigned char *name) { raptor_uri *new_uri; unsigned char *new_uri_string; @@ -316,13 +316,13 @@ raptor_new_uri_for_rdf_concept(raptor_world* world, const char *name) if(!name) return NULL; - new_uri_string_len = base_uri_string_len + strlen(name) + 1; + new_uri_string_len = base_uri_string_len + strlen((const char*)name) + 1; new_uri_string = (unsigned char*)RAPTOR_MALLOC(cstring, new_uri_string_len); if(!new_uri_string) return NULL; strcpy((char*)new_uri_string, (const char*)base_uri_string); - strcpy((char*)new_uri_string + base_uri_string_len, name); + strcpy((char*)new_uri_string + base_uri_string_len, (const char*)name); new_uri = raptor_new_uri(world, new_uri_string); RAPTOR_FREE(cstring, new_uri_string); |