Internal changes

PiperOrigin-RevId: 531626077
pull/12773/head
Mike Kruskal 2 years ago committed by Copybara-Service
parent 902af9abf7
commit 8234e3ec56
  1. 18
      src/google/protobuf/descriptor.cc
  2. 2
      src/google/protobuf/descriptor.h

@ -6456,9 +6456,12 @@ void DescriptorBuilder::BuildService(const ServiceDescriptorProto& proto,
BUILD_ARRAY(proto, result, method, BuildMethod, result);
// Copy options.
result->options_ = AllocateOptions(
proto, result, ServiceDescriptorProto::kOptionsFieldNumber,
"google.protobuf.ServiceOptions", alloc);
{
ServiceOptions* options = AllocateOptions(
proto, result, ServiceDescriptorProto::kOptionsFieldNumber,
"google.protobuf.ServiceOptions", alloc);
result->options_ = options;
}
AddSymbol(result->full_name(), nullptr, result->name(), proto,
Symbol(result));
@ -6479,9 +6482,12 @@ void DescriptorBuilder::BuildMethod(const MethodDescriptorProto& proto,
result->output_type_.Init();
// Copy options.
result->options_ =
AllocateOptions(proto, result, MethodDescriptorProto::kOptionsFieldNumber,
"google.protobuf.MethodOptions", alloc);
{
MethodOptions* options = AllocateOptions(
proto, result, MethodDescriptorProto::kOptionsFieldNumber,
"google.protobuf.MethodOptions", alloc);
result->options_ = options;
}
result->client_streaming_ = proto.client_streaming();
result->server_streaming_ = proto.server_streaming();

@ -1486,6 +1486,7 @@ class PROTOBUF_EXPORT ServiceDescriptor : private internal::SymbolBase {
// available extensions of that message.
const ServiceOptions& options() const;
// The number of methods this service defines.
int method_count() const;
// Gets a MethodDescriptor by index, where 0 <= index < method_count().
@ -1587,6 +1588,7 @@ class PROTOBUF_EXPORT MethodDescriptor : private internal::SymbolBase {
// descriptor.proto, and any available extensions of that message.
const MethodOptions& options() const;
// See Descriptor::CopyTo().
void CopyTo(MethodDescriptorProto* proto) const;

Loading…
Cancel
Save