Internal changes

PiperOrigin-RevId: 531636411
pull/12779/head
Mike Kruskal 2 years ago committed by Copybara-Service
parent c01c2e3859
commit 748579e321
  1. 11
      src/google/protobuf/descriptor.cc
  2. 2
      src/google/protobuf/descriptor.h

@ -6137,9 +6137,14 @@ void DescriptorBuilder::BuildExtensionRange(
"Extension range end number must be greater than start number.");
}
result->options_ = AllocateOptions<Descriptor::ExtensionRange>(
proto, result, DescriptorProto_ExtensionRange::kOptionsFieldNumber,
"google.protobuf.ExtensionRangeOptions", alloc);
// Copy options
{
ExtensionRangeOptions* options =
AllocateOptions<Descriptor::ExtensionRange>(
proto, result, DescriptorProto_ExtensionRange::kOptionsFieldNumber,
"google.protobuf.ExtensionRangeOptions", alloc);
result->options_ = options;
}
}
void DescriptorBuilder::BuildReservedRange(

@ -446,6 +446,7 @@ class PROTOBUF_EXPORT Descriptor : private internal::SymbolBase {
// Returns the ExtensionRangeOptions for this range.
const ExtensionRangeOptions& options() const { return *options_; }
// Returns the name of the containing type.
const std::string& name() const { return containing_type_->name(); }
@ -474,6 +475,7 @@ class PROTOBUF_EXPORT Descriptor : private internal::SymbolBase {
// to this descriptor from the file root.
void GetLocationPath(std::vector<int>* output) const;
friend class DescriptorPool;
friend class DescriptorBuilder;
};

Loading…
Cancel
Save