Remove upb_pb_encoder_encode_unknown

pull/13171/head
Bo Yang 7 years ago
parent 6a6e192375
commit 69dee545ec
  1. 9
      upb/pb/encoder.c
  2. 4
      upb/pb/encoder.h

@ -374,8 +374,7 @@ static void *encode_startdelimfield(void *c, const void *hd) {
return ok ? c : UPB_BREAK;
}
static bool encode_unknown(void *c, const void *hd, const char *buf,
size_t len) {
bool encode_unknown(void *c, const void *hd, const char *buf, size_t len) {
UPB_UNUSED(hd);
return encode_bytes(c, buf, len) && commit(c);
}
@ -571,9 +570,3 @@ upb_pb_encoder *upb_pb_encoder_create(upb_env *env, const upb_handlers *h,
}
upb_sink *upb_pb_encoder_input(upb_pb_encoder *e) { return &e->input_; }
void upb_pb_encoder_encode_unknown(upb_pb_encoder *p, const char *buf,
size_t size) {
encode_bytes(p, buf, size);
commit(p);
}

@ -64,8 +64,8 @@ const upb_handlers *upb_pb_encoder_newhandlers(const upb_msgdef *m,
upb_sink *upb_pb_encoder_input(upb_pb_encoder *p);
upb_pb_encoder* upb_pb_encoder_create(upb_env* e, const upb_handlers* h,
upb_bytessink* output);
void upb_pb_encoder_encode_unknown(upb_pb_encoder* p, const char* buf,
size_t size);
bool encode_unknown(upb_pb_encoder* p, const void* hd, const char* buf,
size_t size);
UPB_END_EXTERN_C

Loading…
Cancel
Save