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:
Eric Haszlakiewicz
2021-11-30 03:27:55 +00:00
parent 320548caf6
commit 2d2382d709
6 changed files with 107 additions and 25 deletions

View File

@@ -71,7 +71,7 @@ struct json_object_iterator json_object_iter_begin(struct json_object *obj)
/// @note For a pair-less Object, head is NULL, which matches our
/// definition of the "end" iterator
iter.opaque_ = pTable->head;
iter.opaque_ = lh_table_head(pTable);
return iter;
}
@@ -98,7 +98,7 @@ void json_object_iter_next(struct json_object_iterator *iter)
JASSERT(NULL != iter);
JASSERT(kObjectEndIterValue != iter->opaque_);
iter->opaque_ = ((const struct lh_entry *)iter->opaque_)->next;
iter->opaque_ = lh_entry_next(((const struct lh_entry *)iter->opaque_));
}
/**