From b40edc21bf6f5b2573092c835538b48bff8b489c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 20 Jan 2011 17:48:26 +0000 Subject: Run, and pass all, bad tests. Fix memory errors. git-svn-id: http://svn.drobilla.net/serd/trunk@10 490d8e77-9747-427b-9fa3-0b8f29cee8a0 --- serd/serd.h | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'serd') diff --git a/serd/serd.h b/serd/serd.h index dd4b25b7..3c39e593 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -1,6 +1,6 @@ /* Serd, an RDF serialisation library. * Copyright 2011 David Robillard - * + * * Serd is free software: you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -15,6 +15,10 @@ * along with this program. If not, see . */ +/* @file + * Public Serd API. + */ + #ifndef SERD_SERD_H #define SERD_SERD_H @@ -40,9 +44,9 @@ #define SERD_API #endif -/* @file - * Public Serd API. - */ +#ifdef __cplusplus +extern "C" { +#endif /** @defgroup serd Serd * @brief A lightweight RDF Serialisation Library. @@ -79,13 +83,13 @@ typedef struct { /* Parsed URI. */ typedef struct { - SerdRange scheme; ///< Scheme - SerdRange authority; ///< Authority - SerdRange path_base; ///< Path prefix if relative - SerdRange path; ///< Path suffix - SerdRange query; ///< Query - SerdRange fragment; ///< Fragment - bool base_uri_has_authority; ///< True iff base URI has authority + SerdRange scheme; ///< Scheme + SerdRange authority; ///< Authority + SerdRange path_base; ///< Path prefix if relative + SerdRange path; ///< Path suffix + SerdRange query; ///< Query + SerdRange fragment; ///< Fragment + bool base_uri_has_authority; ///< True iff base URI has authority } SerdURI; /** Return true iff @a utf8 is a relative URI string. */ @@ -137,7 +141,7 @@ serd_string_new(const uint8_t* utf8); /** Copy @a string. */ SERD_API SerdString* -serd_string_copy(const SerdString* string); +serd_string_copy(const SerdString* str); /** Serialise @a uri to a string. */ SERD_API @@ -240,4 +244,8 @@ serd_namespaces_expand(SerdNamespaces ns, /** @} */ +#ifdef __cplusplus +} /* extern "C" */ +#endif + #endif /* SERD_SERD_H */ -- cgit v1.2.1