From ee3a3191cda5faae5dcc9cd1526292c57f2be343 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Sat, 25 May 2013 10:35:01 -0700 Subject: Updated benchmarks to new API. --- benchmarks/parsestream.upb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'benchmarks/parsestream.upb.c') 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; } -- cgit v1.2.3