aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/type.pb.h
diff options
context:
space:
mode:
authorGravatar Jisi Liu <jisi.liu@gmail.com>2017-10-18 12:22:18 -0700
committerGravatar Jisi Liu <jisi.liu@gmail.com>2017-10-18 12:22:18 -0700
commit1a7a7fca804afa1cf67f8be5e71092898ba40334 (patch)
tree04b3da27c71c607510f34a12cf7856a1b94181ae /src/google/protobuf/type.pb.h
parentc4f59dcc5c13debc572154c8f636b8a9361aacde (diff)
Merge from google internal
Diffstat (limited to 'src/google/protobuf/type.pb.h')
-rw-r--r--src/google/protobuf/type.pb.h340
1 files changed, 185 insertions, 155 deletions
diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h
index 8834e167..85bd660f 100644
--- a/src/google/protobuf/type.pb.h
+++ b/src/google/protobuf/type.pb.h
@@ -322,7 +322,13 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i
::std::string* mutable_name();
::std::string* release_name();
void set_allocated_name(::std::string* name);
+ PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+ " string fields are deprecated and will be removed in a"
+ " future release.")
::std::string* unsafe_arena_release_name();
+ PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+ " string fields are deprecated and will be removed in a"
+ " future release.")
void unsafe_arena_set_allocated_name(
::std::string* name);
@@ -332,15 +338,14 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i
static const int kSourceContextFieldNumber = 5;
private:
void _slow_mutable_source_context();
- ::google::protobuf::SourceContext* _slow_release_source_context();
public:
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::SourceContext* unsafe_arena_release_source_context();
void unsafe_arena_set_allocated_source_context(
::google::protobuf::SourceContext* source_context);
+ ::google::protobuf::SourceContext* unsafe_arena_release_source_context();
// .google.protobuf.Syntax syntax = 6;
void clear_syntax();
@@ -576,7 +581,13 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_
::std::string* mutable_name();
::std::string* release_name();
void set_allocated_name(::std::string* name);
+ PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+ " string fields are deprecated and will be removed in a"
+ " future release.")
::std::string* unsafe_arena_release_name();
+ PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+ " string fields are deprecated and will be removed in a"
+ " future release.")
void unsafe_arena_set_allocated_name(
::std::string* name);
@@ -593,7 +604,13 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_
::std::string* mutable_type_url();
::std::string* release_type_url();
void set_allocated_type_url(::std::string* type_url);
+ PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+ " string fields are deprecated and will be removed in a"
+ " future release.")
::std::string* unsafe_arena_release_type_url();
+ PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+ " string fields are deprecated and will be removed in a"
+ " future release.")
void unsafe_arena_set_allocated_type_url(
::std::string* type_url);
@@ -610,7 +627,13 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_
::std::string* mutable_json_name();
::std::string* release_json_name();
void set_allocated_json_name(::std::string* json_name);
+ PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+ " string fields are deprecated and will be removed in a"
+ " future release.")
::std::string* unsafe_arena_release_json_name();
+ PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+ " string fields are deprecated and will be removed in a"
+ " future release.")
void unsafe_arena_set_allocated_json_name(
::std::string* json_name);
@@ -627,7 +650,13 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_
::std::string* mutable_default_value();
::std::string* release_default_value();
void set_allocated_default_value(::std::string* default_value);
+ PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+ " string fields are deprecated and will be removed in a"
+ " future release.")
::std::string* unsafe_arena_release_default_value();
+ PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+ " string fields are deprecated and will be removed in a"
+ " future release.")
void unsafe_arena_set_allocated_default_value(
::std::string* default_value);
@@ -815,7 +844,13 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i
::std::string* mutable_name();
::std::string* release_name();
void set_allocated_name(::std::string* name);
+ PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+ " string fields are deprecated and will be removed in a"
+ " future release.")
::std::string* unsafe_arena_release_name();
+ PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+ " string fields are deprecated and will be removed in a"
+ " future release.")
void unsafe_arena_set_allocated_name(
::std::string* name);
@@ -825,15 +860,14 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i
static const int kSourceContextFieldNumber = 4;
private:
void _slow_mutable_source_context();
- ::google::protobuf::SourceContext* _slow_release_source_context();
public:
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::SourceContext* unsafe_arena_release_source_context();
void unsafe_arena_set_allocated_source_context(
::google::protobuf::SourceContext* source_context);
+ ::google::protobuf::SourceContext* unsafe_arena_release_source_context();
// .google.protobuf.Syntax syntax = 5;
void clear_syntax();
@@ -978,7 +1012,13 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@pro
::std::string* mutable_name();
::std::string* release_name();
void set_allocated_name(::std::string* name);
+ PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+ " string fields are deprecated and will be removed in a"
+ " future release.")
::std::string* unsafe_arena_release_name();
+ PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+ " string fields are deprecated and will be removed in a"
+ " future release.")
void unsafe_arena_set_allocated_name(
::std::string* name);
@@ -1111,7 +1151,13 @@ class LIBPROTOBUF_EXPORT Option : public ::google::protobuf::Message /* @@protoc
::std::string* mutable_name();
::std::string* release_name();
void set_allocated_name(::std::string* name);
+ PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+ " string fields are deprecated and will be removed in a"
+ " future release.")
::std::string* unsafe_arena_release_name();
+ PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+ " string fields are deprecated and will be removed in a"
+ " future release.")
void unsafe_arena_set_allocated_name(
::std::string* name);
@@ -1121,15 +1167,14 @@ class LIBPROTOBUF_EXPORT Option : public ::google::protobuf::Message /* @@protoc
static const int kValueFieldNumber = 2;
private:
void _slow_mutable_value();
- ::google::protobuf::Any* _slow_release_value();
public:
const ::google::protobuf::Any& value() const;
- ::google::protobuf::Any* mutable_value();
::google::protobuf::Any* release_value();
+ ::google::protobuf::Any* mutable_value();
void set_allocated_value(::google::protobuf::Any* value);
- ::google::protobuf::Any* unsafe_arena_release_value();
void unsafe_arena_set_allocated_value(
::google::protobuf::Any* value);
+ ::google::protobuf::Any* unsafe_arena_release_value();
// @@protoc_insertion_point(class_scope:google.protobuf.Option)
private:
@@ -1200,13 +1245,6 @@ inline ::std::string* Type::release_name() {
return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
-inline ::std::string* Type::unsafe_arena_release_name() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Type.name)
- GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
-
- return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
-}
inline void Type::set_allocated_name(::std::string* name) {
if (name != NULL) {
@@ -1217,6 +1255,13 @@ inline void Type::set_allocated_name(::std::string* name) {
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Type.name)
}
+inline ::std::string* Type::unsafe_arena_release_name() {
+ // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Type.name)
+ GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+
+ return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ GetArenaNoVirtual());
+}
inline void Type::unsafe_arena_set_allocated_name(
::std::string* name) {
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
@@ -1363,16 +1408,29 @@ Type::options() const {
inline bool Type::has_source_context() const {
return this != internal_default_instance() && source_context_ != NULL;
}
-inline void Type::clear_source_context() {
- if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_;
- source_context_ = NULL;
-}
inline const ::google::protobuf::SourceContext& Type::source_context() const {
const ::google::protobuf::SourceContext* p = source_context_;
// @@protoc_insertion_point(field_get:google.protobuf.Type.source_context)
return p != NULL ? *p : *reinterpret_cast<const ::google::protobuf::SourceContext*>(
&::google::protobuf::_SourceContext_default_instance_);
}
+inline ::google::protobuf::SourceContext* Type::release_source_context() {
+ // @@protoc_insertion_point(field_release:google.protobuf.Type.source_context)
+
+ ::google::protobuf::SourceContext* temp = source_context_;
+ if (GetArenaNoVirtual() != NULL) {
+ temp = ::google::protobuf::internal::DuplicateIfNonNull(temp, NULL);
+ }
+ source_context_ = NULL;
+ return temp;
+}
+inline ::google::protobuf::SourceContext* Type::unsafe_arena_release_source_context() {
+ // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Type.source_context)
+
+ ::google::protobuf::SourceContext* temp = source_context_;
+ source_context_ = NULL;
+ return temp;
+}
inline ::google::protobuf::SourceContext* Type::mutable_source_context() {
if (source_context_ == NULL) {
@@ -1381,42 +1439,24 @@ inline ::google::protobuf::SourceContext* Type::mutable_source_context() {
// @@protoc_insertion_point(field_mutable:google.protobuf.Type.source_context)
return source_context_;
}
-inline ::google::protobuf::SourceContext* Type::release_source_context() {
- // @@protoc_insertion_point(field_release:google.protobuf.Type.source_context)
-
- if (GetArenaNoVirtual() != NULL) {
- return _slow_release_source_context();
- } else {
- ::google::protobuf::SourceContext* temp = source_context_;
- source_context_ = NULL;
- return temp;
- }
-}
-inline void Type::set_allocated_source_context(::google::protobuf::SourceContext* source_context) {
+inline void Type::set_allocated_source_context(::google::protobuf::SourceContext* source_context) {
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == NULL) {
- delete source_context_;
- }
- if (source_context != NULL) {
- if (message_arena != NULL) {
- message_arena->Own(source_context);
- }
+ delete reinterpret_cast< ::google::protobuf::MessageLite*>(source_context_);
}
- source_context_ = 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.Type.source_context)
}
-inline ::google::protobuf::SourceContext* Type::unsafe_arena_release_source_context() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Type.source_context)
-
- ::google::protobuf::SourceContext* temp = source_context_;
- source_context_ = NULL;
- return temp;
-}
// .google.protobuf.Syntax syntax = 6;
inline void Type::clear_syntax() {
@@ -1523,13 +1563,6 @@ inline ::std::string* Field::release_name() {
return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
-inline ::std::string* Field::unsafe_arena_release_name() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.name)
- GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
-
- return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
-}
inline void Field::set_allocated_name(::std::string* name) {
if (name != NULL) {
@@ -1540,6 +1573,13 @@ inline void Field::set_allocated_name(::std::string* name) {
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.name)
}
+inline ::std::string* Field::unsafe_arena_release_name() {
+ // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.name)
+ GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+
+ return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ GetArenaNoVirtual());
+}
inline void Field::unsafe_arena_set_allocated_name(
::std::string* name) {
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
@@ -1598,13 +1638,6 @@ inline ::std::string* Field::release_type_url() {
return type_url_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
-inline ::std::string* Field::unsafe_arena_release_type_url() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.type_url)
- GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
-
- return type_url_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
-}
inline void Field::set_allocated_type_url(::std::string* type_url) {
if (type_url != NULL) {
@@ -1615,6 +1648,13 @@ inline void Field::set_allocated_type_url(::std::string* type_url) {
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.type_url)
}
+inline ::std::string* Field::unsafe_arena_release_type_url() {
+ // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.type_url)
+ GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+
+ return type_url_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ GetArenaNoVirtual());
+}
inline void Field::unsafe_arena_set_allocated_type_url(
::std::string* type_url) {
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
@@ -1731,13 +1771,6 @@ inline ::std::string* Field::release_json_name() {
return json_name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
-inline ::std::string* Field::unsafe_arena_release_json_name() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.json_name)
- GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
-
- return json_name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
-}
inline void Field::set_allocated_json_name(::std::string* json_name) {
if (json_name != NULL) {
@@ -1748,6 +1781,13 @@ inline void Field::set_allocated_json_name(::std::string* json_name) {
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.json_name)
}
+inline ::std::string* Field::unsafe_arena_release_json_name() {
+ // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.json_name)
+ GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+
+ return json_name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ GetArenaNoVirtual());
+}
inline void Field::unsafe_arena_set_allocated_json_name(
::std::string* json_name) {
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
@@ -1806,13 +1846,6 @@ inline ::std::string* Field::release_default_value() {
return default_value_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
-inline ::std::string* Field::unsafe_arena_release_default_value() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.default_value)
- GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
-
- return default_value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
-}
inline void Field::set_allocated_default_value(::std::string* default_value) {
if (default_value != NULL) {
@@ -1823,6 +1856,13 @@ inline void Field::set_allocated_default_value(::std::string* default_value) {
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.default_value)
}
+inline ::std::string* Field::unsafe_arena_release_default_value() {
+ // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.default_value)
+ GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+
+ return default_value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ GetArenaNoVirtual());
+}
inline void Field::unsafe_arena_set_allocated_default_value(
::std::string* default_value) {
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
@@ -1885,13 +1925,6 @@ inline ::std::string* Enum::release_name() {
return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
-inline ::std::string* Enum::unsafe_arena_release_name() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Enum.name)
- GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
-
- return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
-}
inline void Enum::set_allocated_name(::std::string* name) {
if (name != NULL) {
@@ -1902,6 +1935,13 @@ inline void Enum::set_allocated_name(::std::string* name) {
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Enum.name)
}
+inline ::std::string* Enum::unsafe_arena_release_name() {
+ // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Enum.name)
+ GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+
+ return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ GetArenaNoVirtual());
+}
inline void Enum::unsafe_arena_set_allocated_name(
::std::string* name) {
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
@@ -1979,16 +2019,29 @@ Enum::options() const {
inline bool Enum::has_source_context() const {
return this != internal_default_instance() && source_context_ != NULL;
}
-inline void Enum::clear_source_context() {
- if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_;
- source_context_ = NULL;
-}
inline const ::google::protobuf::SourceContext& Enum::source_context() const {
const ::google::protobuf::SourceContext* p = source_context_;
// @@protoc_insertion_point(field_get:google.protobuf.Enum.source_context)
return p != NULL ? *p : *reinterpret_cast<const ::google::protobuf::SourceContext*>(
&::google::protobuf::_SourceContext_default_instance_);
}
+inline ::google::protobuf::SourceContext* Enum::release_source_context() {
+ // @@protoc_insertion_point(field_release:google.protobuf.Enum.source_context)
+
+ ::google::protobuf::SourceContext* temp = source_context_;
+ if (GetArenaNoVirtual() != NULL) {
+ temp = ::google::protobuf::internal::DuplicateIfNonNull(temp, NULL);
+ }
+ source_context_ = NULL;
+ return temp;
+}
+inline ::google::protobuf::SourceContext* Enum::unsafe_arena_release_source_context() {
+ // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Enum.source_context)
+
+ ::google::protobuf::SourceContext* temp = source_context_;
+ source_context_ = NULL;
+ return temp;
+}
inline ::google::protobuf::SourceContext* Enum::mutable_source_context() {
if (source_context_ == NULL) {
@@ -1997,42 +2050,24 @@ inline ::google::protobuf::SourceContext* Enum::mutable_source_context() {
// @@protoc_insertion_point(field_mutable:google.protobuf.Enum.source_context)
return source_context_;
}
-inline ::google::protobuf::SourceContext* Enum::release_source_context() {
- // @@protoc_insertion_point(field_release:google.protobuf.Enum.source_context)
-
- if (GetArenaNoVirtual() != NULL) {
- return _slow_release_source_context();
- } else {
- ::google::protobuf::SourceContext* temp = source_context_;
- source_context_ = NULL;
- return temp;
- }
-}
-inline void Enum::set_allocated_source_context(::google::protobuf::SourceContext* source_context) {
+inline void Enum::set_allocated_source_context(::google::protobuf::SourceContext* source_context) {
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == NULL) {
- delete source_context_;
- }
- if (source_context != NULL) {
- if (message_arena != NULL) {
- message_arena->Own(source_context);
- }
+ delete reinterpret_cast< ::google::protobuf::MessageLite*>(source_context_);
}
- source_context_ = 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.Enum.source_context)
}
-inline ::google::protobuf::SourceContext* Enum::unsafe_arena_release_source_context() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Enum.source_context)
-
- ::google::protobuf::SourceContext* temp = source_context_;
- source_context_ = NULL;
- return temp;
-}
// .google.protobuf.Syntax syntax = 5;
inline void Enum::clear_syntax() {
@@ -2097,13 +2132,6 @@ inline ::std::string* EnumValue::release_name() {
return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
-inline ::std::string* EnumValue::unsafe_arena_release_name() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.EnumValue.name)
- GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
-
- return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
-}
inline void EnumValue::set_allocated_name(::std::string* name) {
if (name != NULL) {
@@ -2114,6 +2142,13 @@ inline void EnumValue::set_allocated_name(::std::string* name) {
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValue.name)
}
+inline ::std::string* EnumValue::unsafe_arena_release_name() {
+ // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.EnumValue.name)
+ GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+
+ return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ GetArenaNoVirtual());
+}
inline void EnumValue::unsafe_arena_set_allocated_name(
::std::string* name) {
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
@@ -2220,13 +2255,6 @@ inline ::std::string* Option::release_name() {
return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
-inline ::std::string* Option::unsafe_arena_release_name() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Option.name)
- GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
-
- return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
-}
inline void Option::set_allocated_name(::std::string* name) {
if (name != NULL) {
@@ -2237,6 +2265,13 @@ inline void Option::set_allocated_name(::std::string* name) {
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Option.name)
}
+inline ::std::string* Option::unsafe_arena_release_name() {
+ // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Option.name)
+ GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
+
+ return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ GetArenaNoVirtual());
+}
inline void Option::unsafe_arena_set_allocated_name(
::std::string* name) {
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
@@ -2254,16 +2289,29 @@ inline void Option::unsafe_arena_set_allocated_name(
inline bool Option::has_value() const {
return this != internal_default_instance() && value_ != NULL;
}
-inline void Option::clear_value() {
- if (GetArenaNoVirtual() == NULL && value_ != NULL) delete value_;
- value_ = NULL;
-}
inline const ::google::protobuf::Any& Option::value() const {
const ::google::protobuf::Any* p = value_;
// @@protoc_insertion_point(field_get:google.protobuf.Option.value)
return p != NULL ? *p : *reinterpret_cast<const ::google::protobuf::Any*>(
&::google::protobuf::_Any_default_instance_);
}
+inline ::google::protobuf::Any* Option::release_value() {
+ // @@protoc_insertion_point(field_release:google.protobuf.Option.value)
+
+ ::google::protobuf::Any* temp = value_;
+ if (GetArenaNoVirtual() != NULL) {
+ temp = ::google::protobuf::internal::DuplicateIfNonNull(temp, NULL);
+ }
+ value_ = NULL;
+ return temp;
+}
+inline ::google::protobuf::Any* Option::unsafe_arena_release_value() {
+ // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Option.value)
+
+ ::google::protobuf::Any* temp = value_;
+ value_ = NULL;
+ return temp;
+}
inline ::google::protobuf::Any* Option::mutable_value() {
if (value_ == NULL) {
@@ -2272,42 +2320,24 @@ inline ::google::protobuf::Any* Option::mutable_value() {
// @@protoc_insertion_point(field_mutable:google.protobuf.Option.value)
return value_;
}
-inline ::google::protobuf::Any* Option::release_value() {
- // @@protoc_insertion_point(field_release:google.protobuf.Option.value)
-
- if (GetArenaNoVirtual() != NULL) {
- return _slow_release_value();
- } else {
- ::google::protobuf::Any* temp = value_;
- value_ = NULL;
- return temp;
- }
-}
-inline void Option::set_allocated_value(::google::protobuf::Any* value) {
+inline void Option::set_allocated_value(::google::protobuf::Any* value) {
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == NULL) {
- delete value_;
- }
- if (value != NULL) {
- if (message_arena != NULL) {
- message_arena->Own(value);
- }
+ delete reinterpret_cast< ::google::protobuf::MessageLite*>(value_);
}
- value_ = value;
if (value) {
+ ::google::protobuf::Arena* submessage_arena = NULL;
+ if (message_arena != submessage_arena) {
+ value = ::google::protobuf::internal::GetOwnedMessage(
+ message_arena, value, submessage_arena);
+ }
} else {
}
+ value_ = value;
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Option.value)
}
-inline ::google::protobuf::Any* Option::unsafe_arena_release_value() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Option.value)
-
- ::google::protobuf::Any* temp = value_;
- value_ = NULL;
- return temp;
-}
#ifdef __GNUC__
#pragma GCC diagnostic pop