From 50451ea441280fe193c1c344e299977d8fcbdcc7 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Wed, 13 Jan 2010 19:06:23 -0800 Subject: Make onend upb_sink callback take the field as a parameter. --- src/upb_data.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/upb_data.c') diff --git a/src/upb_data.c b/src/upb_data.c index da72250..dab2d20 100644 --- a/src/upb_data.c +++ b/src/upb_data.c @@ -306,7 +306,7 @@ static void _upb_msgsrc_produceval(union upb_value v, struct upb_fielddef *f, if(upb_issubmsg(f)) { upb_sink_onstart(sink, f); upb_msgsrc_produce(v.msg, upb_downcast_msgdef(f->def), sink); - upb_sink_onend(sink); + upb_sink_onend(sink, f); } else if(upb_isstring(f)) { upb_sink_onstr(sink, f, v.str, 0, upb_strlen(v.str)); } else { @@ -425,8 +425,9 @@ static upb_sink_status _upb_msgsink_startcb(upb_sink *s, struct upb_fielddef *f) return UPB_SINK_CONTINUE; } -static upb_sink_status _upb_msgsink_endcb(upb_sink *s) +static upb_sink_status _upb_msgsink_endcb(upb_sink *s, struct upb_fielddef *f) { + (void)f; // Unused. upb_msgsink *ms = (upb_msgsink*)s; ms->top--; return UPB_SINK_CONTINUE; -- cgit v1.2.3