# HG changeset patch
# User Alanscut <wp_scut@163.com>
# Date 1592796204 -28800
#      Mon Jun 22 11:23:24 2020 +0800
# Node ID 29641daa261d1c9b505f05bde93ea098028a5494
# Parent  0dd373d814694cf878855ebb29baec2cd9d6b49b
fix #376

diff --git a/cJSON.c b/cJSON.c
--- a/cJSON.c
+++ b/cJSON.c
@@ -92,7 +92,7 @@
     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)) 
     {
@@ -102,7 +102,7 @@
     return item->valuestring;
 }
 
-CJSON_PUBLIC(double) cJSON_GetNumberValue(cJSON *item) 
+CJSON_PUBLIC(double) cJSON_GetNumberValue(const cJSON * const item) 
 {
     if (!cJSON_IsNumber(item)) 
     {
diff --git a/cJSON.h b/cJSON.h
--- a/cJSON.h
+++ b/cJSON.h
@@ -176,8 +176,8 @@
 CJSON_PUBLIC(const char *) cJSON_GetErrorPtr(void);
 
 /* Check item type and return its value */
-CJSON_PUBLIC(char *) cJSON_GetStringValue(cJSON *item);
-CJSON_PUBLIC(double) cJSON_GetNumberValue(cJSON *item);
+CJSON_PUBLIC(char *) cJSON_GetStringValue(const cJSON * const item);
+CJSON_PUBLIC(double) cJSON_GetNumberValue(const cJSON * const item);
 
 /* These functions check the type of an item */
 CJSON_PUBLIC(cJSON_bool) cJSON_IsInvalid(const cJSON * const item);