Remove upb_addunknown_handlerfunc and upb_handlers_setaddunknown

pull/13171/head
Bo Yang 7 years ago
parent 0b7904e18c
commit dc9d15084f
  1. 7
      upb/handlers.c
  2. 3
      upb/handlers.h
  3. 4
      upb/pb/decoder.c

@ -372,13 +372,6 @@ SETTER(endseq, upb_endfield_handlerfunc*, UPB_HANDLER_ENDSEQ)
#undef SETTER
bool upb_handlers_setaddunknown(upb_handlers *h,
upb_addunknown_handlerfunc *func,
upb_handlerattr *attr) {
return doset(h, UPB_UNKNOWN_SELECTOR, NULL, UPB_HANDLER_INT32,
(upb_func *)func, attr);
}
bool upb_handlers_setunknown(upb_handlers *h, upb_unknown_handlerfunc *func,
upb_handlerattr *attr) {
return doset(h, UPB_UNKNOWN_SELECTOR, NULL, UPB_HANDLER_INT32,

@ -691,9 +691,6 @@ const upb_status *upb_handlers_status(upb_handlers *h);
void upb_handlers_clearerr(upb_handlers *h);
const upb_msgdef *upb_handlers_msgdef(const upb_handlers *h);
bool upb_handlers_addcleanup(upb_handlers *h, void *p, upb_handlerfree *hfree);
bool upb_handlers_setaddunknown(upb_handlers *h,
upb_addunknown_handlerfunc *func,
upb_handlerattr *attr);
bool upb_handlers_setunknown(upb_handlers *h, upb_unknown_handlerfunc *func,
upb_handlerattr *attr);

@ -543,7 +543,7 @@ UPB_NOINLINE int32_t upb_pbdecoder_checktag_slow(upb_pbdecoder *d,
int32_t upb_pbdecoder_skipunknown(upb_pbdecoder *d, int32_t fieldnum,
uint8_t wire_type) {
upb_addunknown_handlerfunc *addunknown;
upb_unknown_handlerfunc *addunknown;
const void* hd;
if (fieldnum >= 0)
@ -599,7 +599,7 @@ have_tag:
}
if (d->top->groupnum >= 0) {
addunknown = (upb_addunknown_handlerfunc *)upb_handlers_gethandler(
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,

Loading…
Cancel
Save