summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2011-05-10 21:59:46 -0700
committerJoshua Haberman <jhaberman@gmail.com>2011-05-10 21:59:46 -0700
commit3231fd0fdd64bc6355bce921a988713524726f23 (patch)
tree326d6c6d334d14005db80c448fca485f641ed516 /benchmarks
parentea2a80840e08887e6e5ea59bce1f56a3c69bd38c (diff)
Vastly improved/simplified the upb_handlers API.
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/parsestream.upb_table.c5
-rw-r--r--benchmarks/parsetostruct.upb_table.c4
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) {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback