mirror of
https://github.com/json-c/json-c.git
synced 2026-03-26 08:29:06 +08:00
general callback, safer API & related tests
- Changed json_pointer_set_with_array_cb to json_pointer_set_with_cb, related cb updated - Added tests(test_safe_json_pointer_set.*) for new-exported funcs, also updated cmake & meson Signed-off-by: lone <lonechan314@qq.com>
This commit is contained in:
@@ -29,12 +29,19 @@ struct json_pointer_get_result {
|
||||
int json_pointer_get_internal(struct json_object *obj, const char *path,
|
||||
struct json_pointer_get_result *res);
|
||||
|
||||
typedef int(*json_pointer_array_set_cb)(json_object *parent, size_t idx,
|
||||
json_object *value, void *priv);
|
||||
// replaced by json_pointer_set_cb
|
||||
// typedef int(*json_pointer_array_set_cb)(json_object *parent, size_t idx,
|
||||
// json_object *value, void *priv);
|
||||
typedef int(*json_pointer_set_cb)(json_object *parent, const char *key, size_t idx,
|
||||
json_object *value, void *priv);
|
||||
|
||||
int json_pointer_set_with_array_cb(struct json_object **obj, const char *path,
|
||||
// replaced by json_pointer_set_with_cb
|
||||
// int json_pointer_set_with_array_cb(struct json_object **obj, const char *path,
|
||||
// struct json_object *value,
|
||||
// json_pointer_array_set_cb array_set_cb, void *priv);
|
||||
int json_pointer_set_with_cb(struct json_object **obj, const char *path,
|
||||
struct json_object *value,
|
||||
json_pointer_array_set_cb array_set_cb, void *priv);
|
||||
json_pointer_set_cb set_cb, int cb_handles_obj, void *priv);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user