Merge pull request #377 from Alanscut/20190628

fix bug: add const to the parameter in the cJSON_GetStringValue function
This commit is contained in:
Alanscut
2019-10-20 22:47:11 +08:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ CJSON_PUBLIC(const char *) cJSON_GetErrorPtr(void)
return (const char*) (global_error.json + global_error.position);
}
CJSON_PUBLIC(char *) cJSON_GetStringValue(cJSON *item) {
CJSON_PUBLIC(char *) cJSON_GetStringValue(const cJSON * const item) {
if (!cJSON_IsString(item)) {
return NULL;
}