aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/struct.pb.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/struct.pb.cc')
-rw-r--r--src/google/protobuf/struct.pb.cc173
1 files changed, 79 insertions, 94 deletions
diff --git a/src/google/protobuf/struct.pb.cc b/src/google/protobuf/struct.pb.cc
index fe3ba327..ead81689 100644
--- a/src/google/protobuf/struct.pb.cc
+++ b/src/google/protobuf/struct.pb.cc
@@ -7,7 +7,6 @@
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
-#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
@@ -19,6 +18,10 @@
#include "third_party/protobuf/version.h"
#endif
// @@protoc_insertion_point(includes)
+
+namespace protobuf_google_2fprotobuf_2fstruct_2eproto {
+extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ListValue;
+} // namespace protobuf_google_2fprotobuf_2fstruct_2eproto
namespace google {
namespace protobuf {
class Struct_FieldsEntry_DoNotUseDefaultTypeInternal {
@@ -50,14 +53,9 @@ class ListValueDefaultTypeInternal {
} // namespace protobuf
} // namespace google
namespace protobuf_google_2fprotobuf_2fstruct_2eproto {
-void InitDefaultsListValueImpl() {
+static void InitDefaultsListValue() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
-#else
- ::google::protobuf::internal::InitProtobufDefaults();
-#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
{
void* ptr = &::google::protobuf::_Struct_FieldsEntry_DoNotUse_default_instance_;
new (ptr) ::google::protobuf::Struct_FieldsEntry_DoNotUse();
@@ -83,9 +81,11 @@ void InitDefaultsListValueImpl() {
::google::protobuf::ListValue::InitAsDefaultInstance();
}
-void InitDefaultsListValue() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsListValueImpl);
+LIBPROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_ListValue =
+ {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsListValue}, {}};
+
+void InitDefaults() {
+ ::google::protobuf::internal::InitSCC(&scc_info_ListValue.base);
}
::google::protobuf::Metadata file_level_metadata[4];
@@ -140,17 +140,16 @@ static ::google::protobuf::Message const * const file_default_instances[] = {
reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_ListValue_default_instance_),
};
-void protobuf_AssignDescriptors() {
+static void protobuf_AssignDescriptors() {
AddDescriptors();
- ::google::protobuf::MessageFactory* factory = NULL;
AssignDescriptors(
- "google/protobuf/struct.proto", schemas, file_default_instances, TableStruct::offsets, factory,
+ "google/protobuf/struct.proto", schemas, file_default_instances, TableStruct::offsets,
file_level_metadata, file_level_enum_descriptors, NULL);
}
-void protobuf_AssignDescriptorsOnce() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
+static void protobuf_AssignDescriptorsOnce() {
+ static ::google::protobuf::internal::once_flag once;
+ ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
}
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
@@ -159,7 +158,7 @@ void protobuf_RegisterTypes(const ::std::string&) {
::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 4);
}
-void AddDescriptorsImpl() {
+static void AddDescriptorsImpl() {
InitDefaults();
static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
"\n\034google/protobuf/struct.proto\022\017google.p"
@@ -187,8 +186,8 @@ void AddDescriptorsImpl() {
}
void AddDescriptors() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
+ static ::google::protobuf::internal::once_flag once;
+ ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
}
// Force AddDescriptors() to be called at dynamic initialization time.
struct StaticDescriptorInitializer {
@@ -240,9 +239,8 @@ const int Struct::kFieldsFieldNumber;
Struct::Struct()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
- }
+ ::google::protobuf::internal::InitSCC(
+ &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base);
SharedCtor();
// @@protoc_insertion_point(constructor:google.protobuf.Struct)
}
@@ -250,22 +248,20 @@ Struct::Struct(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(),
_internal_metadata_(arena),
fields_(arena) {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
+ ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base);
SharedCtor();
RegisterArenaDtor(arena);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Struct)
}
Struct::Struct(const Struct& from)
: ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _cached_size_(0) {
+ _internal_metadata_(NULL) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
fields_.MergeFrom(from.fields_);
// @@protoc_insertion_point(copy_constructor:google.protobuf.Struct)
}
void Struct::SharedCtor() {
- _cached_size_ = 0;
}
Struct::~Struct() {
@@ -281,12 +277,10 @@ void Struct::ArenaDtor(void* object) {
Struct* _this = reinterpret_cast< Struct* >(object);
(void)_this;
}
-void Struct::RegisterArenaDtor(::google::protobuf::Arena* arena) {
+void Struct::RegisterArenaDtor(::google::protobuf::Arena*) {
}
void Struct::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* Struct::descriptor() {
::protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
@@ -294,13 +288,10 @@ const ::google::protobuf::Descriptor* Struct::descriptor() {
}
const Struct& Struct::default_instance() {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
+ ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base);
return *internal_default_instance();
}
-Struct* Struct::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<Struct>(arena);
-}
void Struct::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Struct)
@@ -318,7 +309,7 @@ bool Struct::MergePartialFromCodedStream(
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.protobuf.Struct)
for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+ ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
@@ -388,7 +379,7 @@ void Struct::SerializeWithCachedSizes(
if (output->IsSerializationDeterministic() &&
this->fields().size() > 1) {
- ::google::protobuf::scoped_array<SortItem> items(
+ ::std::unique_ptr<SortItem[]> items(
new SortItem[this->fields().size()]);
typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::size_type size_type;
size_type n = 0;
@@ -398,7 +389,7 @@ void Struct::SerializeWithCachedSizes(
items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
}
::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
- ::google::protobuf::scoped_ptr<Struct_FieldsEntry_DoNotUse> entry;
+ ::std::unique_ptr<Struct_FieldsEntry_DoNotUse> entry;
for (size_type i = 0; i < n; i++) {
entry.reset(fields_.NewEntryWrapper(
items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
@@ -410,7 +401,7 @@ void Struct::SerializeWithCachedSizes(
Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
}
} else {
- ::google::protobuf::scoped_ptr<Struct_FieldsEntry_DoNotUse> entry;
+ ::std::unique_ptr<Struct_FieldsEntry_DoNotUse> entry;
for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
it = this->fields().begin();
it != this->fields().end(); ++it) {
@@ -457,7 +448,7 @@ void Struct::SerializeWithCachedSizes(
if (deterministic &&
this->fields().size() > 1) {
- ::google::protobuf::scoped_array<SortItem> items(
+ ::std::unique_ptr<SortItem[]> items(
new SortItem[this->fields().size()]);
typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::size_type size_type;
size_type n = 0;
@@ -467,7 +458,7 @@ void Struct::SerializeWithCachedSizes(
items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
}
::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
- ::google::protobuf::scoped_ptr<Struct_FieldsEntry_DoNotUse> entry;
+ ::std::unique_ptr<Struct_FieldsEntry_DoNotUse> entry;
for (size_type i = 0; i < n; i++) {
entry.reset(fields_.NewEntryWrapper(
items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
@@ -481,7 +472,7 @@ void Struct::SerializeWithCachedSizes(
Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
}
} else {
- ::google::protobuf::scoped_ptr<Struct_FieldsEntry_DoNotUse> entry;
+ ::std::unique_ptr<Struct_FieldsEntry_DoNotUse> entry;
for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
it = this->fields().begin();
it != this->fields().end(); ++it) {
@@ -520,7 +511,7 @@ size_t Struct::ByteSizeLong() const {
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->fields_size());
{
- ::google::protobuf::scoped_ptr<Struct_FieldsEntry_DoNotUse> entry;
+ ::std::unique_ptr<Struct_FieldsEntry_DoNotUse> entry;
for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
it = this->fields().begin();
it != this->fields().end(); ++it) {
@@ -537,9 +528,7 @@ size_t Struct::ByteSizeLong() const {
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ SetCachedSize(cached_size);
return total_size;
}
@@ -609,7 +598,6 @@ void Struct::InternalSwap(Struct* other) {
using std::swap;
fields_.Swap(&other->fields_);
_internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Struct::GetMetadata() const {
@@ -672,24 +660,22 @@ const int Value::kListValueFieldNumber;
Value::Value()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
- }
+ ::google::protobuf::internal::InitSCC(
+ &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base);
SharedCtor();
// @@protoc_insertion_point(constructor:google.protobuf.Value)
}
Value::Value(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(),
_internal_metadata_(arena) {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
+ ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base);
SharedCtor();
RegisterArenaDtor(arena);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Value)
}
Value::Value(const Value& from)
: ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _cached_size_(0) {
+ _internal_metadata_(NULL) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
clear_has_kind();
switch (from.kind_case()) {
@@ -726,7 +712,6 @@ Value::Value(const Value& from)
void Value::SharedCtor() {
clear_has_kind();
- _cached_size_ = 0;
}
Value::~Value() {
@@ -745,12 +730,10 @@ void Value::ArenaDtor(void* object) {
Value* _this = reinterpret_cast< Value* >(object);
(void)_this;
}
-void Value::RegisterArenaDtor(::google::protobuf::Arena* arena) {
+void Value::RegisterArenaDtor(::google::protobuf::Arena*) {
}
void Value::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* Value::descriptor() {
::protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
@@ -758,13 +741,10 @@ const ::google::protobuf::Descriptor* Value::descriptor() {
}
const Value& Value::default_instance() {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
+ ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base);
return *internal_default_instance();
}
-Value* Value::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<Value>(arena);
-}
void Value::clear_kind() {
// @@protoc_insertion_point(one_of_clear_start:google.protobuf.Value)
@@ -822,7 +802,7 @@ bool Value::MergePartialFromCodedStream(
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.protobuf.Value)
for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+ ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
@@ -830,7 +810,7 @@ bool Value::MergePartialFromCodedStream(
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
- int value;
+ int value = 0;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
@@ -966,13 +946,13 @@ void Value::SerializeWithCachedSizes(
// .google.protobuf.Struct struct_value = 5;
if (has_struct_value()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 5, *kind_.struct_value_, output);
+ 5, this->_internal_struct_value(), output);
}
// .google.protobuf.ListValue list_value = 6;
if (has_list_value()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 6, *kind_.list_value_, output);
+ 6, this->_internal_list_value(), output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
@@ -1020,14 +1000,14 @@ void Value::SerializeWithCachedSizes(
if (has_struct_value()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
- 5, *kind_.struct_value_, deterministic, target);
+ 5, this->_internal_struct_value(), deterministic, target);
}
// .google.protobuf.ListValue list_value = 6;
if (has_list_value()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
- 6, *kind_.list_value_, deterministic, target);
+ 6, this->_internal_list_value(), deterministic, target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
@@ -1090,9 +1070,7 @@ size_t Value::ByteSizeLong() const {
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ SetCachedSize(cached_size);
return total_size;
}
@@ -1191,7 +1169,6 @@ void Value::InternalSwap(Value* other) {
swap(kind_, other->kind_);
swap(_oneof_case_[0], other->_oneof_case_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Value::GetMetadata() const {
@@ -1210,9 +1187,8 @@ const int ListValue::kValuesFieldNumber;
ListValue::ListValue()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
- }
+ ::google::protobuf::internal::InitSCC(
+ &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base);
SharedCtor();
// @@protoc_insertion_point(constructor:google.protobuf.ListValue)
}
@@ -1220,7 +1196,7 @@ ListValue::ListValue(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(),
_internal_metadata_(arena),
values_(arena) {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
+ ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base);
SharedCtor();
RegisterArenaDtor(arena);
// @@protoc_insertion_point(arena_constructor:google.protobuf.ListValue)
@@ -1228,14 +1204,12 @@ ListValue::ListValue(::google::protobuf::Arena* arena)
ListValue::ListValue(const ListValue& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
- values_(from.values_),
- _cached_size_(0) {
+ values_(from.values_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:google.protobuf.ListValue)
}
void ListValue::SharedCtor() {
- _cached_size_ = 0;
}
ListValue::~ListValue() {
@@ -1251,12 +1225,10 @@ void ListValue::ArenaDtor(void* object) {
ListValue* _this = reinterpret_cast< ListValue* >(object);
(void)_this;
}
-void ListValue::RegisterArenaDtor(::google::protobuf::Arena* arena) {
+void ListValue::RegisterArenaDtor(::google::protobuf::Arena*) {
}
void ListValue::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* ListValue::descriptor() {
::protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
@@ -1264,13 +1236,10 @@ const ::google::protobuf::Descriptor* ListValue::descriptor() {
}
const ListValue& ListValue::default_instance() {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
+ ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base);
return *internal_default_instance();
}
-ListValue* ListValue::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<ListValue>(arena);
-}
void ListValue::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.ListValue)
@@ -1288,7 +1257,7 @@ bool ListValue::MergePartialFromCodedStream(
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.protobuf.ListValue)
for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+ ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
@@ -1296,7 +1265,8 @@ bool ListValue::MergePartialFromCodedStream(
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_values()));
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+ input, add_values()));
} else {
goto handle_unusual;
}
@@ -1333,7 +1303,9 @@ void ListValue::SerializeWithCachedSizes(
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->values_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, this->values(static_cast<int>(i)), output);
+ 1,
+ this->values(static_cast<int>(i)),
+ output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
@@ -1387,9 +1359,7 @@ size_t ListValue::ByteSizeLong() const {
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ SetCachedSize(cached_size);
return total_size;
}
@@ -1457,9 +1427,8 @@ void ListValue::UnsafeArenaSwap(ListValue* other) {
}
void ListValue::InternalSwap(ListValue* other) {
using std::swap;
- values_.InternalSwap(&other->values_);
+ CastToBase(&values_)->InternalSwap(CastToBase(&other->values_));
_internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata ListValue::GetMetadata() const {
@@ -1471,5 +1440,21 @@ void ListValue::InternalSwap(ListValue* other) {
// @@protoc_insertion_point(namespace_scope)
} // namespace protobuf
} // namespace google
+namespace google {
+namespace protobuf {
+template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::Struct_FieldsEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::Struct_FieldsEntry_DoNotUse >(Arena* arena) {
+ return Arena::CreateMessageInternal< ::google::protobuf::Struct_FieldsEntry_DoNotUse >(arena);
+}
+template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::Struct* Arena::CreateMaybeMessage< ::google::protobuf::Struct >(Arena* arena) {
+ return Arena::CreateMessageInternal< ::google::protobuf::Struct >(arena);
+}
+template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::Value* Arena::CreateMaybeMessage< ::google::protobuf::Value >(Arena* arena) {
+ return Arena::CreateMessageInternal< ::google::protobuf::Value >(arena);
+}
+template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::ListValue* Arena::CreateMaybeMessage< ::google::protobuf::ListValue >(Arena* arena) {
+ return Arena::CreateMessageInternal< ::google::protobuf::ListValue >(arena);
+}
+} // namespace protobuf
+} // namespace google
// @@protoc_insertion_point(global_scope)