From 5aa27d91c6f25705c89ec56c5a33f6bd20d9c124 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Tue, 19 Sep 2017 16:45:55 -0700 Subject: Use upb_sink_putunknown for reserve unknown --- upb/pb/decoder.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'upb') diff --git a/upb/pb/decoder.c b/upb/pb/decoder.c index 32509b5..30a1945 100644 --- a/upb/pb/decoder.c +++ b/upb/pb/decoder.c @@ -599,14 +599,7 @@ have_tag: } if (d->top->groupnum >= 0) { - addunknown = (upb_unknown_handlerfunc *)upb_handlers_gethandler( - (d->top->sink).handlers, UPB_UNKNOWN_SELECTOR); - if (addunknown != NULL) { - hd = upb_handlers_gethandlerdata((d->top->sink).handlers, - UPB_UNKNOWN_SELECTOR); - addunknown((d->top->sink).closure, hd, d->checkpoint, - d->ptr - d->checkpoint); - } + upb_sink_putunknown(&d->top->sink, d->checkpoint, d->ptr - d->checkpoint); return DECODE_OK; } -- cgit v1.2.3