diff options
author | Josh Haberman <jhaberman@gmail.com> | 2015-05-08 16:56:29 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2015-05-08 16:56:29 -0700 |
commit | 3bd691a4975b2267ff04611507e766a7f9f87e83 (patch) | |
tree | e5628144f6f920d9ccf792a1499e55503e6ff4d2 /upb/symtab.c | |
parent | 87fc2c516bff207f880c71526926842fd8dcc77e (diff) |
Google-internal development.
Diffstat (limited to 'upb/symtab.c')
-rw-r--r-- | upb/symtab.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/upb/symtab.c b/upb/symtab.c index f172aaa..817a581 100644 --- a/upb/symtab.c +++ b/upb/symtab.c @@ -139,8 +139,10 @@ static bool upb_resolve_dfs(const upb_def *def, upb_strtable *addtab, // For messages, continue the recursion by visiting all subdefs. const upb_msgdef *m = upb_dyncast_msgdef(def); if (m) { - upb_msg_iter i; - for(upb_msg_begin(&i, m); !upb_msg_done(&i); upb_msg_next(&i)) { + upb_msg_field_iter i; + for(upb_msg_field_begin(&i, m); + !upb_msg_field_done(&i); + upb_msg_field_next(&i)) { upb_fielddef *f = upb_msg_iter_field(&i); if (!upb_fielddef_hassubdef(f)) continue; // |= to avoid short-circuit; we need its side-effects. @@ -293,8 +295,10 @@ bool upb_symtab_add(upb_symtab *s, upb_def *const*defs, int n, void *ref_donor, // Type names are resolved relative to the message in which they appear. const char *base = upb_msgdef_fullname(m); - upb_msg_iter j; - for(upb_msg_begin(&j, m); !upb_msg_done(&j); upb_msg_next(&j)) { + upb_msg_field_iter j; + for(upb_msg_field_begin(&j, m); + !upb_msg_field_done(&j); + upb_msg_field_next(&j)) { upb_fielddef *f = upb_msg_iter_field(&j); const char *name = upb_fielddef_subdefname(f); if (name && !upb_fielddef_subdef(f)) { |