From e6869c2e0370b7139819521b5c4e1a9ef0bf392a Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Fri, 13 Apr 2018 10:32:29 +0800 Subject: [PATCH] cJSON_Utils.h: Add include guards and extern C for C++ --- cJSON_Utils.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cJSON_Utils.h b/cJSON_Utils.h index 03ec10c..a970c65 100644 --- a/cJSON_Utils.h +++ b/cJSON_Utils.h @@ -20,6 +20,14 @@ THE SOFTWARE. */ +#ifndef cJSON_Utils__h +#define cJSON_Utils__h + +#ifdef __cplusplus +extern "C" +{ +#endif + #include "cJSON.h" /* Implement RFC6901 (https://tools.ietf.org/html/rfc6901) JSON Pointer spec. */ @@ -72,3 +80,9 @@ CJSON_PUBLIC(char *) cJSONUtils_FindPointerFromObjectTo(const cJSON * const obje /* Sorts the members of the object into alphabetical order. */ CJSON_PUBLIC(void) cJSONUtils_SortObject(cJSON * const object); CJSON_PUBLIC(void) cJSONUtils_SortObjectCaseSensitive(cJSON * const object); + +#ifdef __cplusplus +} +#endif + +#endif