mirror of
https://github.com/json-c/json-c.git
synced 2026-03-23 06:59:06 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user