From 621c0cdcb5efc4f7c2382031becded018ef0b62b Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sun, 4 Sep 2011 19:29:36 -0700 Subject: Const invasion: large parts of upb made const-correct. --- benchmarks/parsestream.upb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'benchmarks/parsestream.upb.c') diff --git a/benchmarks/parsestream.upb.c b/benchmarks/parsestream.upb.c index 2d34206..4d13e9d 100644 --- a/benchmarks/parsestream.upb.c +++ b/benchmarks/parsestream.upb.c @@ -9,7 +9,7 @@ static char *input_str; static size_t input_len; -static upb_msgdef *def; +static const upb_msgdef *def; static upb_decoder decoder; static upb_stringsrc stringsrc; @@ -31,14 +31,14 @@ static bool initialize() // Initialize upb state, decode descriptor. upb_status status = UPB_STATUS_INIT; upb_symtab *s = upb_symtab_new(); - upb_read_descriptorfile(s, MESSAGE_DESCRIPTOR_FILE, &status); + upb_load_descriptor_file_into_symtab(s, MESSAGE_DESCRIPTOR_FILE, &status); if(!upb_ok(&status)) { fprintf(stderr, "Error reading descriptor: %s\n", upb_status_getstr(&status)); return false; } - def = upb_dyncast_msgdef(upb_symtab_lookup(s, MESSAGE_NAME)); + def = upb_dyncast_msgdef_const(upb_symtab_lookup(s, MESSAGE_NAME)); if(!def) { fprintf(stderr, "Error finding symbol '%s'.\n", MESSAGE_NAME); return false; -- cgit v1.2.3