summaryrefslogtreecommitdiff
path: root/benchmarks/parsetostruct.upb.c
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/parsetostruct.upb.c')
-rw-r--r--benchmarks/parsetostruct.upb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/benchmarks/parsetostruct.upb.c b/benchmarks/parsetostruct.upb.c
index 6a36544..5e7aa35 100644
--- a/benchmarks/parsetostruct.upb.c
+++ b/benchmarks/parsetostruct.upb.c
@@ -7,7 +7,7 @@
#include "upb/pb/decoder.h"
#include "upb/pb/glue.h"
-static upb_msgdef *def;
+static const upb_msgdef *def;
static size_t len;
static void *msg[NUM_MESSAGES];
static upb_stringsrc strsrc;
@@ -18,14 +18,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;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback