Add json_object_update_recursive_new()

This commit is contained in:
Kenny Kwok 2021-07-05 11:00:36 +08:00
parent 0dffb4284e
commit 9e662e494d
1 changed files with 6 additions and 0 deletions

View File

@ -286,6 +286,12 @@ static JSON_INLINE int json_object_update_missing_new(json_t *object, json_t *ot
return ret;
}
static JSON_INLINE int json_object_update_recursive_new(json_t *object, json_t *other) {
int ret = json_object_update_recursive(object, other);
json_decref(other);
return ret;
}
size_t json_array_size(const json_t *array);
json_t *json_array_get(const json_t *array, size_t index)
JANSSON_ATTRS((warn_unused_result));