From 2a8ba6f3a26177e98a255ac129568feb6c1440aa Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sun, 6 Dec 2009 17:12:26 -0800 Subject: Updated upbc to new dyncasts. --- tools/upbc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/upbc.c') 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); -- cgit v1.2.3