summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2009-12-06 17:12:26 -0800
committerJoshua Haberman <joshua@reverberate.org>2009-12-06 17:12:26 -0800
commit2a8ba6f3a26177e98a255ac129568feb6c1440aa (patch)
treea08f495e6ea7c380d231a62f42ad434ec4441312 /tools
parent0a6fc5fad3cee99bf4da97214a2ca3deccc9b132 (diff)
Updated upbc to new dyncasts.
Diffstat (limited to 'tools')
-rw-r--r--tools/upbc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/upbc.c b/tools/upbc.c
index 8d41abc..a6ab289 100644
--- a/tools/upbc.c
+++ b/tools/upbc.c
@@ -147,7 +147,7 @@ static void write_h(struct upb_def *defs[], int num_defs, char *outfile_name,
fputs("possibly-recursive ways. */\n\n", stream);
for(int i = 0; i < num_defs; i++) { /* Foreach message */
- struct upb_msgdef *m = upb_downcast_msgdef(defs[i]);
+ struct upb_msgdef *m = upb_dyncast_msgdef(defs[i]);
if(!m) continue;
struct upb_string *msg_name = upb_strdup(UPB_UPCAST(m)->fqname);
to_cident(msg_name);
@@ -160,7 +160,7 @@ static void write_h(struct upb_def *defs[], int num_defs, char *outfile_name,
/* Message Declarations. */
fputs("/* The message definitions themselves. */\n\n", stream);
for(int i = 0; i < num_defs; i++) { /* Foreach message */
- struct upb_msgdef *m = upb_downcast_msgdef(defs[i]);
+ struct upb_msgdef *m = upb_dyncast_msgdef(defs[i]);
if(!m) continue;
struct upb_string *msg_name = upb_strdup(UPB_UPCAST(m)->fqname);
to_cident(msg_name);
@@ -707,7 +707,7 @@ int main(int argc, char *argv[])
if(!h_const_file) error("Failed to open _const.h output file");
int symcount;
- struct upb_def **defs = upb_symtab_getandref_defs(s, &symcount);
+ struct upb_def **defs = upb_symtab_getdefs(s, &symcount, UPB_DEF_ANY);
upb_symtab_unref(s);
write_h(defs, symcount, h_filename, cident, h_file);
write_const_h(defs, symcount, h_filename, h_const_file);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback