summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2009-07-01 18:49:05 -0700
committerJoshua Haberman <joshua@reverberate.org>2009-07-01 18:49:05 -0700
commit692b203ae23c82bb58143ea3e7950febd941a024 (patch)
tree4256c27140dc2b1eae82d5ac4a1596cacc09d5b0
parentfd1ad20a2daf07de8a4c06e862963bfd556dad62 (diff)
Functions for iterating over the symbol table.
-rw-r--r--upb_context.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/upb_context.h b/upb_context.h
index 4f9deaf..e15b4b8 100644
--- a/upb_context.h
+++ b/upb_context.h
@@ -65,7 +65,14 @@ struct upb_symtab_entry *upb_context_resolve(struct upb_context *c,
struct upb_symtab_entry *upb_context_lookup(struct upb_context *c,
struct upb_string *symbol);
-/* TODO: let the client enumerate the symbols. */
+INLINE struct upb_symtab_entry *upb_context_symbegin(struct upb_context *c) {
+ return upb_strtable_begin(&c->symtab);
+}
+
+INLINE struct upb_symtab_entry *upb_context_symnext(
+ struct upb_context *c, struct upb_inttable_entry *cur) {
+ return upb_strtable_next(&c->symtab, cur);
+}
/* Adding symbols. ************************************************************/
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback