From 8865d869db2367a6d48459eea739ebb8369eb1b7 Mon Sep 17 00:00:00 2001 From: Kevin Branigan Date: Thu, 1 Oct 2015 12:03:27 -0400 Subject: [PATCH] =?UTF-8?q?cJSON=5FHasObjectItem=20didn=E2=80=99t=20compil?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cJSON.c | 2 +- cJSON.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cJSON.c b/cJSON.c index a09b469..f7bed44 100644 --- a/cJSON.c +++ b/cJSON.c @@ -662,7 +662,7 @@ static char *print_object(cJSON *item,int depth,int fmt,printbuffer *p) int cJSON_GetArraySize(cJSON *array) {cJSON *c=array->child;int i=0;while(c)i++,c=c->next;return i;} cJSON *cJSON_GetArrayItem(cJSON *array,int item) {cJSON *c=array->child; while (c && item>0) item--,c=c->next; return c;} cJSON *cJSON_GetObjectItem(cJSON *object,const char *string) {cJSON *c=object->child; while (c && cJSON_strcasecmp(c->string,string)) c=c->next; return c;} -int *cJSON_HasObjectItem(cJSON *object,const char *string) { +int cJSON_HasObjectItem(cJSON *object,const char *string) { cJSON *c=object->child; while (c ) { diff --git a/cJSON.h b/cJSON.h index cc3993d..a3221d1 100644 --- a/cJSON.h +++ b/cJSON.h @@ -80,7 +80,7 @@ extern int cJSON_GetArraySize(cJSON *array); extern cJSON *cJSON_GetArrayItem(cJSON *array,int item); /* Get item "string" from object. Case insensitive. */ extern cJSON *cJSON_GetObjectItem(cJSON *object,const char *string); -extern int *cJSON_HasObjectItem(cJSON *object,const char *string); +extern int cJSON_HasObjectItem(cJSON *object,const char *string); /* For analysing failed parses. This returns a pointer to the parse error. You'll probably need to look a few chars back to make sense of it. Defined when cJSON_Parse() returns 0. 0 when cJSON_Parse() succeeds. */ extern const char *cJSON_GetErrorPtr(void); -- GitLab