From: Ben Pfaff Date: Fri, 6 Aug 2010 23:05:17 +0000 (-0700) Subject: json: Add extern "C" { ... } to headers. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0225f3a0f2b18c95ea76362f4a5f816682557a52;p=openvswitch json: Add extern "C" { ... } to headers. This makes it easier for external C++ projects to import the header. CC: Jeremy Stribling --- 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 */