diff options
author | Dave Beckett <dave@dajobe.org> | 2020-09-13 06:14:19 -0700 |
---|---|---|
committer | Dave Beckett <dave@dajobe.org> | 2020-09-13 06:14:19 -0700 |
commit | d5a6331ef703d404709c903066d12d5ef39bae7f (patch) | |
tree | ed30d32ea032cc9d6687b542334d5cda52cc22e2 | |
parent | 445c2682fb5fae932bd89fe8d38e3a21ff504004 (diff) | |
download | raptor-d5a6331ef703d404709c903066d12d5ef39bae7f.tar.gz |
Add raptor_rdf_schema_namespace_uri_len to API
Update raptor_namespace_test to define strings once to avoid ASAN
odr-violation test failure.
-rw-r--r-- | docs/raptor2-sections.txt | 1 | ||||
-rw-r--r-- | src/raptor2.h.in | 8 | ||||
-rw-r--r-- | src/raptor_namespace.c | 2 |
3 files changed, 11 insertions, 0 deletions
diff --git a/docs/raptor2-sections.txt b/docs/raptor2-sections.txt index 90869b1b..8e09ea8b 100644 --- a/docs/raptor2-sections.txt +++ b/docs/raptor2-sections.txt @@ -129,6 +129,7 @@ raptor_statement_ntriples_write <SECTION> <FILE>section-constants</FILE> raptor_rdf_namespace_uri_len +raptor_rdf_schema_namespace_uri_len raptor_xml_literal_datatype_uri_string_len RAPTOR_RDF_MS_URI RAPTOR_RDF_SCHEMA_URI diff --git a/src/raptor2.h.in b/src/raptor2.h.in index f9b9f94a..1d38a93d 100644 --- a/src/raptor2.h.in +++ b/src/raptor2.h.in @@ -252,6 +252,14 @@ RAPTOR_API extern const unsigned char * const raptor_rdf_schema_namespace_uri; /** + * raptor_rdf_schenma_namespace_uri_len: + * + * Length of #raptor_rdf_schenma_namespace_uri string + */ +RAPTOR_API +extern const unsigned int raptor_rdf_schema_namespace_uri_len; + +/** * raptor_xmlschema_datatypes_namespace_uri: * * XML Schema datatypes (xsd:) namespace URI string. diff --git a/src/raptor_namespace.c b/src/raptor_namespace.c index dbd13537..60c98491 100644 --- a/src/raptor_namespace.c +++ b/src/raptor_namespace.c @@ -84,6 +84,7 @@ * */ +#ifndef STANDALONE const unsigned char * const raptor_xml_namespace_uri = (const unsigned char *)"http://www.w3.org/XML/1998/namespace"; const unsigned char * const raptor_rdf_namespace_uri = (const unsigned char *)"http://www.w3.org/1999/02/22-rdf-syntax-ns#"; const unsigned int raptor_rdf_namespace_uri_len = 43; @@ -91,6 +92,7 @@ const unsigned char * const raptor_rdf_schema_namespace_uri = (const unsigned ch const unsigned int raptor_rdf_schema_namespace_uri_len = 37; const unsigned char * const raptor_xmlschema_datatypes_namespace_uri = (const unsigned char *)"http://www.w3.org/2001/XMLSchema#"; const unsigned char * const raptor_owl_namespace_uri = (const unsigned char *)"http://www.w3.org/2002/07/owl#"; +#endif /* hash function to hash namespace prefix strings (usually short strings) |