mirror of
https://github.com/json-c/json-c.git
synced 2026-04-01 19:39:07 +08:00
Add linkhash accessor functions (lh_table_head(), lh_entry_next(), etc...) to pave the way for making the lh_table and lh_entry structure opaque in the future.
Update the docs to mark all members of those structures deprecated, and suggest what to use instead.
This commit is contained in:
@@ -498,7 +498,7 @@ static int json_object_object_to_json_string(struct json_object *jso, struct pri
|
||||
|
||||
static void json_object_lh_entry_free(struct lh_entry *ent)
|
||||
{
|
||||
if (!ent->k_is_constant)
|
||||
if (!lh_entry_k_is_constant(ent))
|
||||
free(lh_entry_k(ent));
|
||||
json_object_put((struct json_object *)lh_entry_v(ent));
|
||||
}
|
||||
@@ -569,7 +569,7 @@ int json_object_object_add_ex(struct json_object *jso, const char *const key,
|
||||
existing_value = (json_object *)lh_entry_v(existing_entry);
|
||||
if (existing_value)
|
||||
json_object_put(existing_value);
|
||||
existing_entry->v = val;
|
||||
lh_entry_set_val(existing_entry, val);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user