aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/empty.pb.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/empty.pb.cc')
-rw-r--r--src/google/protobuf/empty.pb.cc62
1 files changed, 39 insertions, 23 deletions
diff --git a/src/google/protobuf/empty.pb.cc b/src/google/protobuf/empty.pb.cc
index 9ff146f0..6d2ea338 100644
--- a/src/google/protobuf/empty.pb.cc
+++ b/src/google/protobuf/empty.pb.cc
@@ -19,7 +19,10 @@
namespace google {
namespace protobuf {
-class EmptyDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Empty> {
+class EmptyDefaultTypeInternal {
+public:
+ ::google::protobuf::internal::ExplicitlyConstructed<Empty>
+ _instance;
} _Empty_default_instance_;
namespace protobuf_google_2fprotobuf_2fempty_2eproto {
@@ -32,28 +35,27 @@ namespace {
} // namespace
PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField
- const TableStruct::entries[] = {
+ const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
{0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0},
};
PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField
- const TableStruct::aux[] = {
+ const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
::google::protobuf::internal::AuxillaryParseTableField(),
};
PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const
- TableStruct::schema[] = {
- { NULL, NULL, 0, -1, -1, false },
+ TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+ { NULL, NULL, 0, -1, -1, -1, -1, NULL, false },
};
-const ::google::protobuf::uint32 TableStruct::offsets[] = {
+const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Empty, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
};
-
-static const ::google::protobuf::internal::MigrationSchema schemas[] = {
+static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(Empty)},
};
@@ -83,18 +85,13 @@ void protobuf_RegisterTypes(const ::std::string&) {
}
} // namespace
-
-void TableStruct::Shutdown() {
- _Empty_default_instance_.Shutdown();
- delete file_level_metadata[0].reflection;
-}
-
void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults();
- _Empty_default_instance_.DefaultConstruct();
-}
+ _Empty_default_instance_._instance.DefaultConstruct();
+ ::google::protobuf::internal::OnShutdownDestroyMessage(
+ &_Empty_default_instance_);}
void InitDefaults() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
@@ -103,7 +100,7 @@ void InitDefaults() {
namespace {
void AddDescriptorsImpl() {
InitDefaults();
- static const char descriptor[] = {
+ static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
"\n\033google/protobuf/empty.proto\022\017google.pr"
"otobuf\"\007\n\005EmptyBv\n\023com.google.protobufB\n"
"EmptyProtoP\001Z\'github.com/golang/protobuf"
@@ -114,7 +111,6 @@ void AddDescriptorsImpl() {
descriptor, 183);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/empty.proto", &protobuf_RegisterTypes);
- ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown);
}
} // anonymous namespace
@@ -172,6 +168,7 @@ Empty::~Empty() {
void Empty::SharedDtor() {
::google::protobuf::Arena* arena = GetArenaNoVirtual();
+ GOOGLE_DCHECK(arena == NULL);
if (arena != NULL) {
return;
}
@@ -205,6 +202,11 @@ Empty* Empty::New(::google::protobuf::Arena* arena) const {
void Empty::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Empty)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ _internal_metadata_.Clear();
}
bool Empty::MergePartialFromCodedStream(
@@ -217,12 +219,11 @@ bool Empty::MergePartialFromCodedStream(
tag = p.first;
if (!p.second) goto handle_unusual;
handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
+ if (tag == 0) {
goto success;
}
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
+ DO_(::google::protobuf::internal::WireFormat::SkipField(
+ input, tag, _internal_metadata_.mutable_unknown_fields()));
}
success:
// @@protoc_insertion_point(parse_success:google.protobuf.Empty)
@@ -239,6 +240,10 @@ void Empty::SerializeWithCachedSizes(
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
+ }
// @@protoc_insertion_point(serialize_end:google.protobuf.Empty)
}
@@ -249,6 +254,10 @@ void Empty::SerializeWithCachedSizes(
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Empty)
return target;
}
@@ -257,6 +266,11 @@ size_t Empty::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Empty)
size_t total_size = 0;
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ total_size +=
+ ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
+ }
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
@@ -326,7 +340,9 @@ void Empty::UnsafeArenaSwap(Empty* other) {
InternalSwap(other);
}
void Empty::InternalSwap(Empty* other) {
- std::swap(_cached_size_, other->_cached_size_);
+ using std::swap;
+ _internal_metadata_.Swap(&other->_internal_metadata_);
+ swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Empty::GetMetadata() const {