diff options
Diffstat (limited to 'upb_table.h')
-rw-r--r-- | upb_table.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/upb_table.h b/upb_table.h index 4452fc9..0c4df93 100644 --- a/upb_table.h +++ b/upb_table.h @@ -102,6 +102,15 @@ INLINE void *upb_inttable_lookup(struct upb_inttable *t, void *upb_strtable_lookup(struct upb_strtable *t, struct upb_string *key); +/* Provides iteration over the table. The order in which the entries are + * returned is undefined. Insertions invalidate iterators. The _next + * functions return NULL when the end has been reached. */ +void *upb_inttable_begin(struct upb_inttable *t); +void *upb_inttable_next(struct upb_inttable *t, struct upb_inttable_entry *cur); + +void *upb_strtable_begin(struct upb_strtable *t); +void *upb_strtable_next(struct upb_strtable *t, struct upb_strtable_entry *cur); + #ifdef __cplusplus } /* extern "C" */ #endif |