[ovs-dev] [PATCH] json: Add extern "C" { ... } to headers.
Ben Pfaff
blp at nicira.com
Fri Aug 6 16:05:24 PDT 2010
This makes it easier for external C++ projects to import the header.
CC: Jeremy Stribling <strib at nicira.com>
---
lib/json.h | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/lib/json.h b/lib/json.h
index 41257b0..5c32c06 100644
--- a/lib/json.h
+++ b/lib/json.h
@@ -32,6 +32,10 @@
#include "shash.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct ds;
/* Type of a JSON value. */
@@ -128,4 +132,8 @@ void json_to_ds(const struct json *, int flags, struct ds *);
bool json_string_unescape(const char *in, size_t in_len, char **outp);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* json.h */
--
1.7.1
More information about the dev
mailing list