Internal change.

PiperOrigin-RevId: 511341281
pull/12000/head
Protobuf Team Bot 2 years ago committed by Copybara-Service
parent 7958aa90ce
commit 5995ad26a5
  1. 2
      src/google/protobuf/extension_set.h
  2. 10
      src/google/protobuf/wire_format.cc

@ -75,6 +75,7 @@ class Reflection; // message.h
class UnknownFieldSet; // unknown_field_set.h
namespace internal {
class FieldSkipper; // wire_format_lite.h
class WireFormat;
enum class LazyVerifyOption;
} // namespace internal
} // namespace protobuf
@ -514,6 +515,7 @@ class PROTOBUF_EXPORT ExtensionSet {
friend class RepeatedEnumTypeTraits;
friend class google::protobuf::Reflection;
friend class google::protobuf::internal::WireFormat;
const int32_t& GetRefInt32(int number, const int32_t& default_value) const;
const int64_t& GetRefInt64(int number, const int64_t& default_value) const;

@ -1466,11 +1466,11 @@ uint8_t* WireFormat::InternalSerializeMessageSetItem(
// Write type ID.
target = WireFormatLite::WriteUInt32ToArray(
WireFormatLite::kMessageSetTypeIdNumber, field->number(), target);
// Write message.
auto& msg = message_reflection->GetMessage(message, field);
target = WireFormatLite::InternalWriteMessage(
WireFormatLite::kMessageSetMessageNumber, msg, msg.GetCachedSize(),
target, stream);
// Write message.
auto& msg = message_reflection->GetMessage(message, field);
target = WireFormatLite::InternalWriteMessage(
WireFormatLite::kMessageSetMessageNumber, msg, msg.GetCachedSize(),
target, stream);
// End group.
target = stream->EnsureSpace(target);
target = io::CodedOutputStream::WriteTagToArray(

Loading…
Cancel
Save