From 5db217305f37a79eeccd70f000088a06ec82fcec Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Thu, 21 May 2015 14:28:59 -0700 Subject: down-integrate internal changes --- src/google/protobuf/type.pb.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/google/protobuf/type.pb.h') diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h index a14edd4a..c9952efa 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h @@ -936,7 +936,7 @@ inline bool Type::has_source_context() const { return !_is_default_instance_ && source_context_ != NULL; } inline void Type::clear_source_context() { - if (source_context_ != NULL) delete source_context_; + if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_; source_context_ = NULL; } inline const ::google::protobuf::SourceContext& Type::source_context() const { @@ -1270,7 +1270,7 @@ inline bool Enum::has_source_context() const { return !_is_default_instance_ && source_context_ != NULL; } inline void Enum::clear_source_context() { - if (source_context_ != NULL) delete source_context_; + if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_; source_context_ = NULL; } inline const ::google::protobuf::SourceContext& Enum::source_context() const { @@ -1445,7 +1445,7 @@ inline bool Option::has_value() const { return !_is_default_instance_ && value_ != NULL; } inline void Option::clear_value() { - if (value_ != NULL) delete value_; + if (GetArenaNoVirtual() == NULL && value_ != NULL) delete value_; value_ = NULL; } inline const ::google::protobuf::Any& Option::value() const { @@ -1478,6 +1478,14 @@ inline void Option::set_allocated_value(::google::protobuf::Any* value) { } #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) -- cgit v1.2.3