Add extern C blocks to wire_reader and eps_copy_input_stream.

PiperOrigin-RevId: 498262528
pull/13171/head
Protobuf Team Bot 2 years ago committed by Copybara-Service
parent 112f037da6
commit 466408978f
  1. 8
      upb/wire/eps_copy_input_stream.h
  2. 5
      upb/wire/reader.c
  3. 8
      upb/wire/reader.h

@ -35,6 +35,10 @@
// Must be last.
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
#endif
// The maximum number of bytes a single protobuf field can take up in the
// wire format. We only want to do one bounds check per field, so the input
// stream guarantees that after upb_EpsCopyInputStream_IsDone() is called,
@ -405,6 +409,10 @@ static UPB_FORCEINLINE bool upb_EpsCopyInputStream_TryParseDelimitedFast(
return true;
}
#ifdef __cplusplus
} /* extern "C" */
#endif
#include "upb/port/undef.inc"
#endif // UPB_WIRE_EPS_COPY_INPUT_STREAM_H_

@ -27,11 +27,12 @@
#include "upb/wire/reader.h"
// Must be last.
#include "upb/port/def.inc"
#include "upb/wire/eps_copy_input_stream.h"
#include "upb/wire/types.h"
// Must be last.
#include "upb/port/def.inc"
UPB_NOINLINE _upb_WireReader_ReadLongVarintRet
_upb_WireReader_ReadLongVarint(const char* ptr, uint64_t val) {
_upb_WireReader_ReadLongVarintRet ret = {NULL, 0};

@ -35,6 +35,10 @@
// Must be last.
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
#endif
// The upb_WireReader interface is suitable for general-purpose parsing of
// protobuf binary wire format. It is designed to be used along with
// upb_EpsCopyInputStream for buffering, and all parsing routines in this file
@ -198,6 +202,10 @@ UPB_INLINE const char* upb_WireReader_SkipValue(
}
}
#ifdef __cplusplus
} /* extern "C" */
#endif
#include "upb/port/undef.inc"
#endif // UPB_WIRE_READER_H_

Loading…
Cancel
Save