diff options
author | Joshua Haberman <joshua@reverberate.org> | 2009-06-28 09:31:46 -0700 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2009-06-28 09:31:46 -0700 |
commit | 2da3b081c47fe8fe7476da228323d2040e876f56 (patch) | |
tree | f402f516d30be67dd3713477862c5248b8a882a2 /upb_table.h | |
parent | 3a67a1e9f95535adbc67f42771789cd83443a377 (diff) |
More work on upb_context.
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 |