From 2d2382d709951c4941ad6ce5e58e5e63c79be786 Mon Sep 17 00:00:00 2001 From: Eric Haszlakiewicz Date: Tue, 30 Nov 2021 03:27:55 +0000 Subject: 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. --- json_object_iterator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'json_object_iterator.c') diff --git a/json_object_iterator.c b/json_object_iterator.c index 1c2b3f2..db8488a 100644 --- a/json_object_iterator.c +++ b/json_object_iterator.c @@ -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_)); } /** -- cgit v1.2.1