1.make it can been compiled with Visual Studio 2010

2.replace json_object_get/put API with json_object_retain/release, as they operate the reference counter, and confused with array_list_get/put_idx.
3.replace array_list_get/put_idx API with array_list_get/insert to make them more clear to use.
This commit is contained in:
Haffon
2017-08-22 13:53:47 +08:00
parent af87944585
commit 3141c3976b
10 changed files with 41 additions and 32 deletions

View File

@@ -240,7 +240,7 @@ int json_pointer_set(struct json_object **obj, const char *path, struct json_obj
}
if (path[0] == '\0') {
json_object_put(*obj);
json_object_release(*obj);
*obj = value;
return 0;
}
@@ -294,7 +294,7 @@ int json_pointer_setf(struct json_object **obj, struct json_object *value, const
return rc;
if (path_copy[0] == '\0') {
json_object_put(*obj);
json_object_release(*obj);
*obj = value;
goto out;
}