From 1a7a7fca804afa1cf67f8be5e71092898ba40334 Mon Sep 17 00:00:00 2001 From: Jisi Liu Date: Wed, 18 Oct 2017 12:22:18 -0700 Subject: Merge from google internal --- src/google/protobuf/api.pb.h | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) (limited to 'src/google/protobuf/api.pb.h') diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h index c41d74bd..e74528e1 100644 --- a/src/google/protobuf/api.pb.h +++ b/src/google/protobuf/api.pb.h @@ -225,8 +225,8 @@ class LIBPROTOBUF_EXPORT Api : public ::google::protobuf::Message /* @@protoc_in void clear_source_context(); static const int kSourceContextFieldNumber = 5; const ::google::protobuf::SourceContext& source_context() const; - ::google::protobuf::SourceContext* mutable_source_context(); ::google::protobuf::SourceContext* release_source_context(); + ::google::protobuf::SourceContext* mutable_source_context(); void set_allocated_source_context(::google::protobuf::SourceContext* source_context); // .google.protobuf.Syntax syntax = 7; @@ -641,9 +641,6 @@ Api::methods() const { inline int Api::options_size() const { return options_.size(); } -inline void Api::clear_options() { - options_.Clear(); -} inline const ::google::protobuf::Option& Api::options(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Api.options) return options_.Get(index); @@ -724,16 +721,19 @@ inline void Api::set_allocated_version(::std::string* version) { inline bool Api::has_source_context() const { return this != internal_default_instance() && source_context_ != NULL; } -inline void Api::clear_source_context() { - if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_; - source_context_ = NULL; -} inline const ::google::protobuf::SourceContext& Api::source_context() const { const ::google::protobuf::SourceContext* p = source_context_; // @@protoc_insertion_point(field_get:google.protobuf.Api.source_context) return p != NULL ? *p : *reinterpret_cast( &::google::protobuf::_SourceContext_default_instance_); } +inline ::google::protobuf::SourceContext* Api::release_source_context() { + // @@protoc_insertion_point(field_release:google.protobuf.Api.source_context) + + ::google::protobuf::SourceContext* temp = source_context_; + source_context_ = NULL; + return temp; +} inline ::google::protobuf::SourceContext* Api::mutable_source_context() { if (source_context_ == NULL) { @@ -742,21 +742,22 @@ inline ::google::protobuf::SourceContext* Api::mutable_source_context() { // @@protoc_insertion_point(field_mutable:google.protobuf.Api.source_context) return source_context_; } -inline ::google::protobuf::SourceContext* Api::release_source_context() { - // @@protoc_insertion_point(field_release:google.protobuf.Api.source_context) - - ::google::protobuf::SourceContext* temp = source_context_; - source_context_ = NULL; - return temp; -} inline void Api::set_allocated_source_context(::google::protobuf::SourceContext* source_context) { - delete source_context_; - source_context_ = source_context; + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete reinterpret_cast< ::google::protobuf::MessageLite*>(source_context_); + } if (source_context) { + ::google::protobuf::Arena* submessage_arena = NULL; + if (message_arena != submessage_arena) { + source_context = ::google::protobuf::internal::GetOwnedMessage( + message_arena, source_context, submessage_arena); + } } else { } + source_context_ = source_context; // @@protoc_insertion_point(field_set_allocated:google.protobuf.Api.source_context) } @@ -999,9 +1000,6 @@ inline void Method::set_response_streaming(bool value) { inline int Method::options_size() const { return options_.size(); } -inline void Method::clear_options() { - options_.Clear(); -} inline const ::google::protobuf::Option& Method::options(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Method.options) return options_.Get(index); -- cgit v1.2.3