diff options
author | Joshua Haberman <joshua@reverberate.org> | 2010-07-24 17:01:45 -0700 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2010-07-24 17:01:45 -0700 |
commit | 372c8f0487a666c3fb36edc18accba0fba9a2680 (patch) | |
tree | 1265fee2c2324a5bca84208fdf29caa3a8697818 /benchmarks/parsestream.upb_table.c | |
parent | 851c6a6915b55842809c8622d0fb941bc911be37 (diff) |
Fixes to benchmark.
Diffstat (limited to 'benchmarks/parsestream.upb_table.c')
-rw-r--r-- | benchmarks/parsestream.upb_table.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/benchmarks/parsestream.upb_table.c b/benchmarks/parsestream.upb_table.c index c6acad9..1e18119 100644 --- a/benchmarks/parsestream.upb_table.c +++ b/benchmarks/parsestream.upb_table.c @@ -17,6 +17,12 @@ static bool initialize() upb_status status = UPB_STATUS_INIT; upb_symtab *s = upb_symtab_new(); upb_symtab_add_descriptorproto(s); + upb_def *fds_def = upb_symtab_lookup( + s, UPB_STRLIT("google.protobuf.FileDescriptorSet")); + if (!fds_def) { + fprintf(stderr, "Couldn't load FileDescriptorSet def"); + } + upb_string *fds_str = upb_strreadfile(MESSAGE_DESCRIPTOR_FILE); if(fds_str == NULL) { fprintf(stderr, "Couldn't read " MESSAGE_DESCRIPTOR_FILE ":"), @@ -26,8 +32,6 @@ static bool initialize() upb_stringsrc *ssrc = upb_stringsrc_new(); upb_stringsrc_reset(ssrc, fds_str); - upb_def *fds_def = upb_symtab_lookup( - s, UPB_STRLIT("google.protobuf.FileDescriptorSet")); upb_decoder *d = upb_decoder_new(upb_downcast_msgdef(fds_def)); upb_decoder_reset(d, upb_stringsrc_bytesrc(ssrc)); |