From 775b2b21d0ac735314983e09e2f0982067a33dd9 Mon Sep 17 00:00:00 2001 From: "@gageas" Date: Wed, 12 Nov 2014 19:32:09 +0900 Subject: [PATCH] Fix compile error on C++ compiler. (mismatch between char* and const char*) --- parson.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/parson.c b/parson.c index 163a04e..8d52ef1 100755 --- a/parson.c +++ b/parson.c @@ -1224,8 +1224,8 @@ JSON_Status json_object_set_null(JSON_Object *object, const char *name) { } JSON_Status json_object_dotset_value(JSON_Object *object, const char *name, JSON_Value *value) { - char *dot_pos = strchr(name, '.'); - char *current_name = NULL; + const char *dot_pos = strchr(name, '.'); + const char *current_name = NULL; JSON_Object *temp_obj = NULL; JSON_Value *new_value = NULL; if (value == NULL) { @@ -1291,8 +1291,8 @@ JSON_Status json_object_remove(JSON_Object *object, const char *name) { } JSON_Status json_object_dotremove(JSON_Object *object, const char *name) { - char *dot_pos = strchr(name, '.'); - char *current_name = NULL; + const char *dot_pos = strchr(name, '.'); + const char *current_name = NULL; JSON_Object *temp_obj = NULL; if (dot_pos == NULL) { return json_object_remove(object, name);