summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2010-10-23 23:00:21 (GMT)
committer John Mark Bell <jmb@netsurf-browser.org>2010-10-23 23:00:21 (GMT)
commita3e5a9ca169a8f4d13d82fe2673939a96e56ff62 (patch)
treea048ccd8270bab71649a5953f8a3f188f7fe54a4
parent0a4771f5deebb4c961d35d94525eb91d2afa9cca (diff)
downloadlibhubbub-a3e5a9ca169a8f4d13d82fe2673939a96e56ff62.tar.gz
libhubbub-a3e5a9ca169a8f4d13d82fe2673939a96e56ff62.tar.bz2
Sprinkle some C++ scoping around
svn path=/trunk/hubbub/; revision=10901
-rw-r--r--include/hubbub/errors.h9
-rw-r--r--include/hubbub/functypes.h9
-rw-r--r--include/hubbub/hubbub.h9
-rw-r--r--include/hubbub/parser.h9
-rw-r--r--include/hubbub/tree.h9
-rw-r--r--include/hubbub/types.h9
6 files changed, 54 insertions, 0 deletions
diff --git a/include/hubbub/errors.h b/include/hubbub/errors.h
index 607c06b..ee7870a 100644
--- a/include/hubbub/errors.h
+++ b/include/hubbub/errors.h
@@ -8,6 +8,11 @@
#ifndef hubbub_errors_h_
#define hubbub_errors_h_
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
#include <stddef.h>
typedef enum hubbub_error {
@@ -28,5 +33,9 @@ typedef enum hubbub_error {
/* Convert a hubbub error value to a string */
const char *hubbub_error_to_string(hubbub_error error);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/include/hubbub/functypes.h b/include/hubbub/functypes.h
index 021c403..1b65e32 100644
--- a/include/hubbub/functypes.h
+++ b/include/hubbub/functypes.h
@@ -8,6 +8,11 @@
#ifndef hubbub_functypes_h_
#define hubbub_functypes_h_
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
@@ -47,5 +52,9 @@ typedef hubbub_error (*hubbub_token_handler)(
typedef void (*hubbub_error_handler)(uint32_t line, uint32_t col,
const char *message, void *pw);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/include/hubbub/hubbub.h b/include/hubbub/hubbub.h
index 7de7e5c..d6ddc01 100644
--- a/include/hubbub/hubbub.h
+++ b/include/hubbub/hubbub.h
@@ -8,6 +8,11 @@
#ifndef hubbub_h_
#define hubbub_h_
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
#include <hubbub/errors.h>
#include <hubbub/functypes.h>
#include <hubbub/types.h>
@@ -19,5 +24,9 @@ hubbub_error hubbub_initialise(const char *aliases_file,
/* Clean up after Hubbub */
hubbub_error hubbub_finalise(hubbub_allocator_fn alloc, void *pw);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/include/hubbub/parser.h b/include/hubbub/parser.h
index e1e504c..06b8d7f 100644
--- a/include/hubbub/parser.h
+++ b/include/hubbub/parser.h
@@ -8,6 +8,11 @@
#ifndef hubbub_parser_h_
#define hubbub_parser_h_
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
#include <stdbool.h>
#include <inttypes.h>
@@ -77,5 +82,9 @@ hubbub_error hubbub_parser_completed(hubbub_parser *parser);
const char *hubbub_parser_read_charset(hubbub_parser *parser,
hubbub_charset_source *source);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/include/hubbub/tree.h b/include/hubbub/tree.h
index 5da768b..545f5b1 100644
--- a/include/hubbub/tree.h
+++ b/include/hubbub/tree.h
@@ -8,6 +8,11 @@
#ifndef hubbub_tree_h_
#define hubbub_tree_h_
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
#include <hubbub/functypes.h>
/**
@@ -277,5 +282,9 @@ typedef struct hubbub_tree_handler {
void *ctx; /**< Context pointer */
} hubbub_tree_handler;
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/include/hubbub/types.h b/include/hubbub/types.h
index 66eca39..e5c208b 100644
--- a/include/hubbub/types.h
+++ b/include/hubbub/types.h
@@ -8,6 +8,11 @@
#ifndef hubbub_types_h_
#define hubbub_types_h_
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
#include <stdbool.h>
#include <inttypes.h>
@@ -125,4 +130,8 @@ typedef struct hubbub_token {
} data; /**< Type-specific data */
} hubbub_token;
+#ifdef __cplusplus
+}
+#endif
+
#endif