summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2013-05-25 10:35:01 -0700
committerJosh Haberman <jhaberman@gmail.com>2013-05-25 10:35:01 -0700
commitee3a3191cda5faae5dcc9cd1526292c57f2be343 (patch)
tree9df417a452f08a9205ae2c1ceea20abe8cd83491 /benchmarks
parentc70a75429626a85f9fe4975fabaddbb75a39f79f (diff)
Updated benchmarks to new API.
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/parsestream.upb.c7
-rw-r--r--benchmarks/parsetoproto2.upb.cc2
2 files changed, 5 insertions, 4 deletions
diff --git a/benchmarks/parsestream.upb.c b/benchmarks/parsestream.upb.c
index 0d709a4..54aa546 100644
--- a/benchmarks/parsestream.upb.c
+++ b/benchmarks/parsestream.upb.c
@@ -13,8 +13,9 @@ static const upb_msgdef *def;
upb_pipeline pipeline;
static upb_sink *sink;
-static void *startsubmsg(const upb_sinkframe *frame) {
- UPB_UNUSED(frame);
+static void *startsubmsg(void *closure, const void *hd) {
+ UPB_UNUSED(closure);
+ UPB_UNUSED(hd);
return input_str;
}
@@ -68,7 +69,7 @@ static bool initialize()
sink = upb_pipeline_newsink(&pipeline, decoder_handlers);
upb_pipeline_donateref(&pipeline, decoder_handlers, &decoder_handlers);
upb_pipeline_donateref(&pipeline, handlers, &handlers);
- upb_pbdecoder *decoder = upb_sinkframe_userdata(upb_sink_top(sink));
+ upb_pbdecoder *decoder = upb_sink_getobj(sink);
upb_pbdecoder_resetsink(decoder, s2);
return true;
}
diff --git a/benchmarks/parsetoproto2.upb.cc b/benchmarks/parsetoproto2.upb.cc
index 4ad1faa..699b521 100644
--- a/benchmarks/parsetoproto2.upb.cc
+++ b/benchmarks/parsetoproto2.upb.cc
@@ -35,7 +35,7 @@ static bool initialize()
pipeline.DonateRef(h, &h);
pipeline.DonateRef(h2, &h2);
- upb::pb::Decoder* d = decoder_sink->top()->GetUserdata<upb::pb::Decoder>();
+ upb::pb::Decoder* d = decoder_sink->GetObject<upb::pb::Decoder>();
upb::pb::ResetDecoderSink(d, proto2_sink);
return true;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback