Internal changes

PiperOrigin-RevId: 531223460
pull/12738/head
Mike Kruskal 2 years ago committed by Copybara-Service
parent b0be4f8738
commit ef39d27a0f
  1. 10
      src/google/protobuf/descriptor.cc
  2. 2
      src/google/protobuf/descriptor.h

@ -6311,9 +6311,12 @@ void DescriptorBuilder::BuildEnum(const EnumDescriptorProto& proto,
} }
// Copy options. // Copy options.
result->options_ = {
EnumOptions* options =
AllocateOptions(proto, result, EnumDescriptorProto::kOptionsFieldNumber, AllocateOptions(proto, result, EnumDescriptorProto::kOptionsFieldNumber,
"google.protobuf.EnumOptions", alloc); "google.protobuf.EnumOptions", alloc);
result->options_ = options;
}
AddSymbol(result->full_name(), parent, result->name(), proto, Symbol(result)); AddSymbol(result->full_name(), parent, result->name(), proto, Symbol(result));
@ -6389,9 +6392,12 @@ void DescriptorBuilder::BuildEnumValue(const EnumValueDescriptorProto& proto,
ValidateSymbolName(proto.name(), result->full_name(), proto); ValidateSymbolName(proto.name(), result->full_name(), proto);
// Copy options. // Copy options.
result->options_ = AllocateOptions( {
EnumValueOptions* options = AllocateOptions(
proto, result, EnumValueDescriptorProto::kOptionsFieldNumber, proto, result, EnumValueDescriptorProto::kOptionsFieldNumber,
"google.protobuf.EnumValueOptions", alloc); "google.protobuf.EnumValueOptions", alloc);
result->options_ = options;
}
// Again, enum values are weird because we makes them appear as siblings // Again, enum values are weird because we makes them appear as siblings
// of the enum type instead of children of it. So, we use // of the enum type instead of children of it. So, we use

@ -1184,6 +1184,7 @@ class PROTOBUF_EXPORT EnumDescriptor : private internal::SymbolBase {
// extensions of that message. // extensions of that message.
const EnumOptions& options() const; const EnumOptions& options() const;
// See Descriptor::CopyTo(). // See Descriptor::CopyTo().
void CopyTo(EnumDescriptorProto* proto) const; void CopyTo(EnumDescriptorProto* proto) const;
@ -1368,6 +1369,7 @@ class PROTOBUF_EXPORT EnumValueDescriptor : private internal::SymbolBaseN<0>,
// available extensions of that message. // available extensions of that message.
const EnumValueOptions& options() const; const EnumValueOptions& options() const;
// See Descriptor::CopyTo(). // See Descriptor::CopyTo().
void CopyTo(EnumValueDescriptorProto* proto) const; void CopyTo(EnumValueDescriptorProto* proto) const;

Loading…
Cancel
Save