From d2f9bec5c6f3c34362cf13e35e11d3dbc7888a32 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sat, 12 Jan 2019 16:15:46 -0800 Subject: Removed old-style C++ handlers that relied on UB in favor of more normal ones. --- upb/pb/compile_decoder.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'upb/pb/compile_decoder.c') diff --git a/upb/pb/compile_decoder.c b/upb/pb/compile_decoder.c index 02f5179..e17ca03 100644 --- a/upb/pb/compile_decoder.c +++ b/upb/pb/compile_decoder.c @@ -516,7 +516,7 @@ static upb_pbdecodermethod *find_submethod(const compiler *c, static void putsel(compiler *c, opcode op, upb_selector_t sel, const upb_handlers *h) { - if (upb_handlers_gethandler(h, sel)) { + if (upb_handlers_gethandler(h, sel, NULL)) { putop(c, op, sel); } } @@ -532,9 +532,9 @@ static bool haslazyhandlers(const upb_handlers *h, const upb_fielddef *f) { if (!upb_fielddef_lazy(f)) return false; - return upb_handlers_gethandler(h, getsel(f, UPB_HANDLER_STARTSTR)) || - upb_handlers_gethandler(h, getsel(f, UPB_HANDLER_STRING)) || - upb_handlers_gethandler(h, getsel(f, UPB_HANDLER_ENDSTR)); + return upb_handlers_gethandler(h, getsel(f, UPB_HANDLER_STARTSTR), NULL) || + upb_handlers_gethandler(h, getsel(f, UPB_HANDLER_STRING), NULL) || + upb_handlers_gethandler(h, getsel(f, UPB_HANDLER_ENDSTR), NULL); } -- cgit v1.2.3