From 61e5d367ff180a4fcd48dd06b9918a9d37edc766 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Fri, 18 Feb 2011 18:17:06 -0800 Subject: Change the API for getting the bootstrapped defs. The symtab that contains them is now hidden, and you can look them up by name but there is no access to the symtab itself, so there is no risk of mutating it (by extending it, adding other defs to it, etc). --- benchmarks/parsestream.upb_table.c | 6 ------ benchmarks/parsetostruct.upb_table.c | 1 - 2 files changed, 7 deletions(-) (limited to 'benchmarks') diff --git a/benchmarks/parsestream.upb_table.c b/benchmarks/parsestream.upb_table.c index a646999..85c9ff9 100644 --- a/benchmarks/parsestream.upb_table.c +++ b/benchmarks/parsestream.upb_table.c @@ -17,12 +17,6 @@ static bool initialize() // Initialize upb state, decode descriptor. 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) { diff --git a/benchmarks/parsetostruct.upb_table.c b/benchmarks/parsetostruct.upb_table.c index 592f86e..dfdd5b2 100644 --- a/benchmarks/parsetostruct.upb_table.c +++ b/benchmarks/parsetostruct.upb_table.c @@ -20,7 +20,6 @@ static bool initialize() // Initialize upb state, decode descriptor. upb_status status = UPB_STATUS_INIT; upb_symtab *s = upb_symtab_new(); - upb_symtab_add_descriptorproto(s); upb_string *fds_str = upb_strreadfile(MESSAGE_DESCRIPTOR_FILE); if(fds_str == NULL) { -- cgit v1.2.3