diff --git a/cJSON_Utils.c b/cJSON_Utils.c index 1b87d1be0078d9b26993a926fa5d5287695cd869..2f131a893c48cd4de5f47adec5a30d6a49e0d1cf 100644 --- a/cJSON_Utils.c +++ b/cJSON_Utils.c @@ -1140,7 +1140,7 @@ static cJSON *cJSONUtils_SortList(cJSON *list) return result; } -CJSON_PUBLIC(void) cJSONUtils_SortObject(cJSON *object) +CJSON_PUBLIC(void) cJSONUtils_SortObject(cJSON * const object) { object->child = cJSONUtils_SortList(object->child); } diff --git a/cJSON_Utils.h b/cJSON_Utils.h index 88898eea8c1577bc416ed78206e01526c22827b8..d7234bbe2247e2d7330719fdc5d591abc293e55b 100644 --- a/cJSON_Utils.h +++ b/cJSON_Utils.h @@ -64,4 +64,4 @@ CJSON_PUBLIC(cJSON *) cJSONUtils_GenerateMergePatch(cJSON *from, cJSON *to); CJSON_PUBLIC(char *) cJSONUtils_FindPointerFromObjectTo(const cJSON * const object, const cJSON * const target); /* Sorts the members of the object into alphabetical order. */ -CJSON_PUBLIC(void) cJSONUtils_SortObject(cJSON *object); +CJSON_PUBLIC(void) cJSONUtils_SortObject(cJSON * const object);