Internal changes

PiperOrigin-RevId: 531631350
pull/12779/head
Mike Kruskal 2 years ago committed by Copybara-Service
parent 8234e3ec56
commit c01c2e3859
  1. 9
      src/google/protobuf/descriptor.cc
  2. 1
      src/google/protobuf/descriptor.h

@ -6183,9 +6183,12 @@ void DescriptorBuilder::BuildOneof(const OneofDescriptorProto& proto,
result->fields_ = nullptr; result->fields_ = nullptr;
// Copy options. // Copy options.
result->options_ = {
AllocateOptions(proto, result, OneofDescriptorProto::kOptionsFieldNumber, OneofOptions* options = AllocateOptions(
"google.protobuf.OneofOptions", alloc); proto, result, OneofDescriptorProto::kOptionsFieldNumber,
"google.protobuf.OneofOptions", alloc);
result->options_ = options; // Set to default_instance later if necessary.
}
AddSymbol(result->full_name(), parent, result->name(), proto, Symbol(result)); AddSymbol(result->full_name(), parent, result->name(), proto, Symbol(result));
} }

@ -1109,6 +1109,7 @@ class PROTOBUF_EXPORT OneofDescriptor : private internal::SymbolBase {
const OneofOptions& options() const; const OneofOptions& options() const;
// See Descriptor::CopyTo(). // See Descriptor::CopyTo().
void CopyTo(OneofDescriptorProto* proto) const; void CopyTo(OneofDescriptorProto* proto) const;

Loading…
Cancel
Save