diff options
author | jstebbins <[email protected]> | 2015-05-14 17:11:48 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2015-05-14 17:11:48 +0000 |
commit | 9ae7e30dc8daace92d17ea36a4f0bdede00b9471 (patch) | |
tree | 9485255c993389a6740b833e7aa30c5b5b2622aa /libhb/hb_dict.c | |
parent | 90cafad3e4c610b8b009769f922fabc283979231 (diff) |
lingui: use libhb preset management from linux gui
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7179 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/hb_dict.c')
-rw-r--r-- | libhb/hb_dict.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/libhb/hb_dict.c b/libhb/hb_dict.c index 866803f58..634b25b09 100644 --- a/libhb/hb_dict.c +++ b/libhb/hb_dict.c @@ -32,10 +32,9 @@ hb_value_t * hb_value_dup(const hb_value_t *value) return json_deep_copy(value); } -void hb_value_incref(hb_value_t *value) +hb_value_t* hb_value_incref(hb_value_t *value) { - if (value == NULL) return; - json_incref(value); + return json_incref(value); } void hb_value_decref(hb_value_t *value) @@ -89,11 +88,6 @@ hb_value_t * hb_value_read_json(const char *path) { json_error_t error; hb_value_t *val = json_load_file(path, 0, &error); - if (val == NULL) - { - hb_error("hb_value_read_json: Failed, path (%s), error %s", - path, error.text); - } return val; } @@ -484,7 +478,7 @@ hb_value_t * hb_dict_iter_value(const hb_dict_iter_t iter) } int -hb_dict_iter_next_ex(hb_dict_t *dict, hb_dict_iter_t *iter, +hb_dict_iter_next_ex(const hb_dict_t *dict, hb_dict_iter_t *iter, const char **key, hb_value_t **val) { if (*iter == NULL) @@ -493,7 +487,7 @@ hb_dict_iter_next_ex(hb_dict_t *dict, hb_dict_iter_t *iter, *key = json_object_iter_key(*iter); if (val != NULL) *val = json_object_iter_value(*iter); - *iter = json_object_iter_next(dict, *iter); + *iter = json_object_iter_next((hb_dict_t*)dict, *iter); return 1; } |