From 0225f3a0f2b18c95ea76362f4a5f816682557a52 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 6 Aug 2010 16:05:17 -0700 Subject: [PATCH] json: Add extern "C" { ... } to headers. This makes it easier for external C++ projects to import the header. CC: Jeremy Stribling --- lib/json.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/json.h b/lib/json.h index 41257b0d..5c32c06c 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 */ -- 2.30.2