Skip to content
Snippets Groups Projects
Commit 29641daa261d authored by Alanscut's avatar Alanscut
Browse files

fix #376

parent 0dd373d81469
No related branches found
No related tags found
No related merge requests found
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
return (const char*) (global_error.json + global_error.position); 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)) if (!cJSON_IsString(item))
{ {
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
return item->valuestring; return item->valuestring;
} }
CJSON_PUBLIC(double) cJSON_GetNumberValue(cJSON *item) CJSON_PUBLIC(double) cJSON_GetNumberValue(const cJSON * const item)
{ {
if (!cJSON_IsNumber(item)) if (!cJSON_IsNumber(item))
{ {
......
...@@ -176,8 +176,8 @@ ...@@ -176,8 +176,8 @@
CJSON_PUBLIC(const char *) cJSON_GetErrorPtr(void); CJSON_PUBLIC(const char *) cJSON_GetErrorPtr(void);
/* Check item type and return its value */ /* Check item type and return its value */
CJSON_PUBLIC(char *) cJSON_GetStringValue(cJSON *item); CJSON_PUBLIC(char *) cJSON_GetStringValue(const cJSON * const item);
CJSON_PUBLIC(double) cJSON_GetNumberValue(cJSON *item); CJSON_PUBLIC(double) cJSON_GetNumberValue(const cJSON * const item);
/* These functions check the type of an item */ /* These functions check the type of an item */
CJSON_PUBLIC(cJSON_bool) cJSON_IsInvalid(const cJSON * const item); CJSON_PUBLIC(cJSON_bool) cJSON_IsInvalid(const cJSON * const item);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment