aboutsummaryrefslogtreecommitdiffstats
path: root/serd
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-01-20 17:48:26 +0000
committerDavid Robillard <d@drobilla.net>2011-01-20 17:48:26 +0000
commitb40edc21bf6f5b2573092c835538b48bff8b489c (patch)
treeeecd4df410104dfb7e7d650f2374e99663e1e345 /serd
parente507454f6a304c7e53f596bcd5ac761ef790d479 (diff)
downloadserd-b40edc21bf6f5b2573092c835538b48bff8b489c.tar.gz
serd-b40edc21bf6f5b2573092c835538b48bff8b489c.tar.bz2
serd-b40edc21bf6f5b2573092c835538b48bff8b489c.zip
Run, and pass all, bad tests.
Fix memory errors. git-svn-id: http://svn.drobilla.net/serd/trunk@10 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'serd')
-rw-r--r--serd/serd.h32
1 files changed, 20 insertions, 12 deletions
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 <d@drobilla.net>
- *
+ *
* 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 <http://www.gnu.org/licenses/>.
*/
+/* @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 */