diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2011-05-10 21:59:46 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2011-05-10 21:59:46 -0700 |
commit | 3231fd0fdd64bc6355bce921a988713524726f23 (patch) | |
tree | 326d6c6d334d14005db80c448fca485f641ed516 /benchmarks | |
parent | ea2a80840e08887e6e5ea59bce1f56a3c69bd38c (diff) |
Vastly improved/simplified the upb_handlers API.
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/parsestream.upb_table.c | 5 | ||||
-rw-r--r-- | benchmarks/parsetostruct.upb_table.c | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/benchmarks/parsestream.upb_table.c b/benchmarks/parsestream.upb_table.c index 6107894..00eb1bb 100644 --- a/benchmarks/parsestream.upb_table.c +++ b/benchmarks/parsestream.upb_table.c @@ -61,9 +61,10 @@ static bool initialize() return false; } - upb_handlers_init(&handlers, def); + upb_handlers_init(&handlers); // Cause all messages to be read, but do nothing when they are. - upb_register_all(&handlers, NULL, NULL, value, startsubmsg, NULL); + upb_handlerset hset = {NULL, NULL, value, startsubmsg, NULL}; + upb_handlers_reghandlerset(&handlers, def, &hset); upb_decoder_init(&decoder, &handlers); upb_stringsrc_init(&stringsrc); return true; diff --git a/benchmarks/parsetostruct.upb_table.c b/benchmarks/parsetostruct.upb_table.c index 397f964..10d1481 100644 --- a/benchmarks/parsetostruct.upb_table.c +++ b/benchmarks/parsetostruct.upb_table.c @@ -53,8 +53,8 @@ static bool initialize() msg = upb_msg_new(def); upb_stringsrc_init(&strsrc); - upb_handlers_init(&h, def); - upb_msg_regdhandlers(&h); + upb_handlers_init(&h); + upb_msg_reghandlers(&h, def); upb_decoder_init(&d, &h); if (!BYREF) { |