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.
result->options_ =
{
EnumOptions* options =
AllocateOptions(proto, result, EnumDescriptorProto::kOptionsFieldNumber,
"google.protobuf.EnumOptions", alloc);
result->options_ = options;
}
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);
// Copy options.
result->options_ = AllocateOptions(
{
EnumValueOptions* options = AllocateOptions(
proto, result, EnumValueDescriptorProto::kOptionsFieldNumber,
"google.protobuf.EnumValueOptions", alloc);
result->options_ = options;
}
// Again, enum values are weird because we makes them appear as siblings
// 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.
const EnumOptions& options() const;
// See Descriptor::CopyTo().
void CopyTo(EnumDescriptorProto* proto) const;
@ -1368,6 +1369,7 @@ class PROTOBUF_EXPORT EnumValueDescriptor : private internal::SymbolBaseN<0>,
// available extensions of that message.
const EnumValueOptions& options() const;
// See Descriptor::CopyTo().
void CopyTo(EnumValueDescriptorProto* proto) const;

Loading…
Cancel
Save