Commit c2f69d6f authored by Jisi Liu's avatar Jisi Liu Committed by GitHub

Merge pull request #3450 from pherl/invalidoffset

Fix invalid offsetof warning.
parents e243fd8a 4cbbf33b
...@@ -930,7 +930,7 @@ no_warning_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \ ...@@ -930,7 +930,7 @@ no_warning_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
../gmock/gtest/lib/libgtest_main.la ../gmock/gtest/lib/libgtest_main.la
no_warning_test_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include no_warning_test_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include
no_warning_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF) \ no_warning_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF) \
-Wall -Werror -Wno-invalid-offsetof -Werror=missing-declarations -Wall -Werror -Werror=missing-declarations
nodist_no_warning_test_SOURCES = no_warning_test.cc $(protoc_outputs) nodist_no_warning_test_SOURCES = no_warning_test.cc $(protoc_outputs)
TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \ TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
......
...@@ -19,7 +19,10 @@ ...@@ -19,7 +19,10 @@
namespace google { namespace google {
namespace protobuf { namespace protobuf {
class AnyDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Any> { class AnyDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Any>
_instance;
} _Any_default_instance_; } _Any_default_instance_;
namespace protobuf_google_2fprotobuf_2fany_2eproto { namespace protobuf_google_2fprotobuf_2fany_2eproto {
...@@ -88,7 +91,7 @@ void TableStruct::InitDefaultsImpl() { ...@@ -88,7 +91,7 @@ void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION; GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults(); ::google::protobuf::internal::InitProtobufDefaults();
_Any_default_instance_.DefaultConstruct(); _Any_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_Any_default_instance_);} &_Any_default_instance_);}
......
...@@ -19,11 +19,20 @@ ...@@ -19,11 +19,20 @@
namespace google { namespace google {
namespace protobuf { namespace protobuf {
class ApiDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Api> { class ApiDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Api>
_instance;
} _Api_default_instance_; } _Api_default_instance_;
class MethodDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Method> { class MethodDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Method>
_instance;
} _Method_default_instance_; } _Method_default_instance_;
class MixinDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Mixin> { class MixinDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Mixin>
_instance;
} _Mixin_default_instance_; } _Mixin_default_instance_;
namespace protobuf_google_2fprotobuf_2fapi_2eproto { namespace protobuf_google_2fprotobuf_2fapi_2eproto {
...@@ -124,13 +133,13 @@ void TableStruct::InitDefaultsImpl() { ...@@ -124,13 +133,13 @@ void TableStruct::InitDefaultsImpl() {
::google::protobuf::internal::InitProtobufDefaults(); ::google::protobuf::internal::InitProtobufDefaults();
::google::protobuf::protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto::InitDefaults(); ::google::protobuf::protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto::InitDefaults();
::google::protobuf::protobuf_google_2fprotobuf_2ftype_2eproto::InitDefaults(); ::google::protobuf::protobuf_google_2fprotobuf_2ftype_2eproto::InitDefaults();
_Api_default_instance_.DefaultConstruct(); _Api_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_Api_default_instance_);_Method_default_instance_.DefaultConstruct(); &_Api_default_instance_);_Method_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_Method_default_instance_);_Mixin_default_instance_.DefaultConstruct(); &_Method_default_instance_);_Mixin_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_Mixin_default_instance_);_Api_default_instance_.get_mutable()->source_context_ = const_cast< ::google::protobuf::SourceContext*>( &_Mixin_default_instance_);_Api_default_instance_._instance.get_mutable()->source_context_ = const_cast< ::google::protobuf::SourceContext*>(
::google::protobuf::SourceContext::internal_default_instance()); ::google::protobuf::SourceContext::internal_default_instance());
} }
......
...@@ -351,9 +351,10 @@ void FileGenerator::GenerateSource(io::Printer* printer) { ...@@ -351,9 +351,10 @@ void FileGenerator::GenerateSource(io::Printer* printer) {
"::"; "::";
} }
printer->Print( printer->Print(
"class $classname$DefaultTypeInternal : " "class $classname$DefaultTypeInternal {\n"
"public ::google::protobuf::internal::ExplicitlyConstructed<$parent$$classname$> " "public:\n"
"{\n", " ::google::protobuf::internal::ExplicitlyConstructed<$parent$$classname$>\n"
" _instance;\n",
"parent", parent, "classname", message_generators_[i]->classname_); "parent", parent, "classname", message_generators_[i]->classname_);
printer->Indent(); printer->Indent();
message_generators_[i]->GenerateExtraDefaultFields(printer); message_generators_[i]->GenerateExtraDefaultFields(printer);
...@@ -740,7 +741,7 @@ void FileGenerator::GenerateBuildDescriptors(io::Printer* printer) { ...@@ -740,7 +741,7 @@ void FileGenerator::GenerateBuildDescriptors(io::Printer* printer) {
printer->Print( printer->Print(
"file_level_metadata[$index$].reflection = " "file_level_metadata[$index$].reflection = "
"$parent$::$classname$::CreateReflection(file_level_metadata[$index$]" "$parent$::$classname$::CreateReflection(file_level_metadata[$index$]"
".descriptor, _$classname$_default_instance_.get_mutable());\n", ".descriptor, _$classname$_default_instance_._instance.get_mutable());\n",
"index", SimpleItoa(i), "parent", "index", SimpleItoa(i), "parent",
ClassName(message_generators_[i]->descriptor_->containing_type(), ClassName(message_generators_[i]->descriptor_->containing_type(),
false), false),
......
...@@ -1604,7 +1604,6 @@ GenerateExtraDefaultFields(io::Printer* printer) { ...@@ -1604,7 +1604,6 @@ GenerateExtraDefaultFields(io::Printer* printer) {
// Generate oneof default instance and weak field instances for reflection // Generate oneof default instance and weak field instances for reflection
// usage. // usage.
if (descriptor_->oneof_decl_count() > 0 || num_weak_fields_ > 0) { if (descriptor_->oneof_decl_count() > 0 || num_weak_fields_ > 0) {
printer->Print("public:\n");
for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { for (int i = 0; i < descriptor_->oneof_decl_count(); i++) {
for (int j = 0; j < descriptor_->oneof_decl(i)->field_count(); j++) { for (int j = 0; j < descriptor_->oneof_decl(i)->field_count(); j++) {
const FieldDescriptor* field = descriptor_->oneof_decl(i)->field(j); const FieldDescriptor* field = descriptor_->oneof_decl(i)->field(j);
...@@ -1977,7 +1976,7 @@ GenerateDefaultInstanceAllocator(io::Printer* printer) { ...@@ -1977,7 +1976,7 @@ GenerateDefaultInstanceAllocator(io::Printer* printer) {
// Construct the default instance. We can't call InitAsDefaultInstance() yet // Construct the default instance. We can't call InitAsDefaultInstance() yet
// because we need to make sure all default instances that this one might // because we need to make sure all default instances that this one might
// depend on are constructed first. // depend on are constructed first.
printer->Print("_$classname$_default_instance_.DefaultConstruct();\n" printer->Print("_$classname$_default_instance_._instance.DefaultConstruct();\n"
"::google::protobuf::internal::OnShutdownDestroyMessage(\n" "::google::protobuf::internal::OnShutdownDestroyMessage(\n"
" &_$classname$_default_instance_);", " &_$classname$_default_instance_);",
"classname", classname_); "classname", classname_);
...@@ -1987,9 +1986,9 @@ void MessageGenerator:: ...@@ -1987,9 +1986,9 @@ void MessageGenerator::
GenerateDefaultInstanceInitializer(io::Printer* printer) { GenerateDefaultInstanceInitializer(io::Printer* printer) {
if (IsMapEntryMessage(descriptor_)) { if (IsMapEntryMessage(descriptor_)) {
printer->Print( printer->Print(
"_$classname$_default_instance_.get_mutable()->set_default_instance(_$" "_$classname$_default_instance_._instance.get_mutable()->set_default_instance(_$"
"classname$_default_instance_.get_mutable());\n" "classname$_default_instance_._instance.get_mutable());\n"
"_$classname$_default_instance_.get_mutable()->InitAsDefaultInstance();" "_$classname$_default_instance_._instance.get_mutable()->InitAsDefaultInstance();"
"\n", "\n",
"classname", classname_); "classname", classname_);
return; return;
...@@ -2012,7 +2011,8 @@ GenerateDefaultInstanceInitializer(io::Printer* printer) { ...@@ -2012,7 +2011,8 @@ GenerateDefaultInstanceInitializer(io::Printer* printer) {
if (field->containing_oneof() || field->options().weak()) { if (field->containing_oneof() || field->options().weak()) {
name = "_" + classname_ + "_default_instance_."; name = "_" + classname_ + "_default_instance_.";
} else { } else {
name = "_" + classname_ + "_default_instance_.get_mutable()->"; name =
"_" + classname_ + "_default_instance_._instance.get_mutable()->";
} }
name += FieldName(field); name += FieldName(field);
printer->Print( printer->Print(
......
...@@ -20,13 +20,25 @@ ...@@ -20,13 +20,25 @@
namespace google { namespace google {
namespace protobuf { namespace protobuf {
namespace compiler { namespace compiler {
class VersionDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Version> { class VersionDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Version>
_instance;
} _Version_default_instance_; } _Version_default_instance_;
class CodeGeneratorRequestDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<CodeGeneratorRequest> { class CodeGeneratorRequestDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<CodeGeneratorRequest>
_instance;
} _CodeGeneratorRequest_default_instance_; } _CodeGeneratorRequest_default_instance_;
class CodeGeneratorResponse_FileDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<CodeGeneratorResponse_File> { class CodeGeneratorResponse_FileDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<CodeGeneratorResponse_File>
_instance;
} _CodeGeneratorResponse_File_default_instance_; } _CodeGeneratorResponse_File_default_instance_;
class CodeGeneratorResponseDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<CodeGeneratorResponse> { class CodeGeneratorResponseDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<CodeGeneratorResponse>
_instance;
} _CodeGeneratorResponse_default_instance_; } _CodeGeneratorResponse_default_instance_;
namespace protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto { namespace protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto {
...@@ -144,15 +156,15 @@ void TableStruct::InitDefaultsImpl() { ...@@ -144,15 +156,15 @@ void TableStruct::InitDefaultsImpl() {
::google::protobuf::internal::InitProtobufDefaults(); ::google::protobuf::internal::InitProtobufDefaults();
::google::protobuf::protobuf_google_2fprotobuf_2fdescriptor_2eproto::InitDefaults(); ::google::protobuf::protobuf_google_2fprotobuf_2fdescriptor_2eproto::InitDefaults();
_Version_default_instance_.DefaultConstruct(); _Version_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_Version_default_instance_);_CodeGeneratorRequest_default_instance_.DefaultConstruct(); &_Version_default_instance_);_CodeGeneratorRequest_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_CodeGeneratorRequest_default_instance_);_CodeGeneratorResponse_File_default_instance_.DefaultConstruct(); &_CodeGeneratorRequest_default_instance_);_CodeGeneratorResponse_File_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_CodeGeneratorResponse_File_default_instance_);_CodeGeneratorResponse_default_instance_.DefaultConstruct(); &_CodeGeneratorResponse_File_default_instance_);_CodeGeneratorResponse_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_CodeGeneratorResponse_default_instance_);_CodeGeneratorRequest_default_instance_.get_mutable()->compiler_version_ = const_cast< ::google::protobuf::compiler::Version*>( &_CodeGeneratorResponse_default_instance_);_CodeGeneratorRequest_default_instance_._instance.get_mutable()->compiler_version_ = const_cast< ::google::protobuf::compiler::Version*>(
::google::protobuf::compiler::Version::internal_default_instance()); ::google::protobuf::compiler::Version::internal_default_instance());
} }
......
This diff is collapsed.
...@@ -19,7 +19,10 @@ ...@@ -19,7 +19,10 @@
namespace google { namespace google {
namespace protobuf { namespace protobuf {
class DurationDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Duration> { class DurationDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Duration>
_instance;
} _Duration_default_instance_; } _Duration_default_instance_;
namespace protobuf_google_2fprotobuf_2fduration_2eproto { namespace protobuf_google_2fprotobuf_2fduration_2eproto {
...@@ -88,7 +91,7 @@ void TableStruct::InitDefaultsImpl() { ...@@ -88,7 +91,7 @@ void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION; GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults(); ::google::protobuf::internal::InitProtobufDefaults();
_Duration_default_instance_.DefaultConstruct(); _Duration_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_Duration_default_instance_);} &_Duration_default_instance_);}
......
...@@ -19,7 +19,10 @@ ...@@ -19,7 +19,10 @@
namespace google { namespace google {
namespace protobuf { namespace protobuf {
class EmptyDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Empty> { class EmptyDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Empty>
_instance;
} _Empty_default_instance_; } _Empty_default_instance_;
namespace protobuf_google_2fprotobuf_2fempty_2eproto { namespace protobuf_google_2fprotobuf_2fempty_2eproto {
...@@ -86,7 +89,7 @@ void TableStruct::InitDefaultsImpl() { ...@@ -86,7 +89,7 @@ void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION; GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults(); ::google::protobuf::internal::InitProtobufDefaults();
_Empty_default_instance_.DefaultConstruct(); _Empty_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_Empty_default_instance_);} &_Empty_default_instance_);}
......
...@@ -19,7 +19,10 @@ ...@@ -19,7 +19,10 @@
namespace google { namespace google {
namespace protobuf { namespace protobuf {
class FieldMaskDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<FieldMask> { class FieldMaskDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<FieldMask>
_instance;
} _FieldMask_default_instance_; } _FieldMask_default_instance_;
namespace protobuf_google_2fprotobuf_2ffield_5fmask_2eproto { namespace protobuf_google_2fprotobuf_2ffield_5fmask_2eproto {
...@@ -87,7 +90,7 @@ void TableStruct::InitDefaultsImpl() { ...@@ -87,7 +90,7 @@ void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION; GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults(); ::google::protobuf::internal::InitProtobufDefaults();
_FieldMask_default_instance_.DefaultConstruct(); _FieldMask_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_FieldMask_default_instance_);} &_FieldMask_default_instance_);}
......
...@@ -19,7 +19,10 @@ ...@@ -19,7 +19,10 @@
namespace google { namespace google {
namespace protobuf { namespace protobuf {
class SourceContextDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<SourceContext> { class SourceContextDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<SourceContext>
_instance;
} _SourceContext_default_instance_; } _SourceContext_default_instance_;
namespace protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto { namespace protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto {
...@@ -87,7 +90,7 @@ void TableStruct::InitDefaultsImpl() { ...@@ -87,7 +90,7 @@ void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION; GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults(); ::google::protobuf::internal::InitProtobufDefaults();
_SourceContext_default_instance_.DefaultConstruct(); _SourceContext_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_SourceContext_default_instance_);} &_SourceContext_default_instance_);}
......
...@@ -19,12 +19,20 @@ ...@@ -19,12 +19,20 @@
namespace google { namespace google {
namespace protobuf { namespace protobuf {
class Struct_FieldsEntryDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Struct::Struct_FieldsEntry> { class Struct_FieldsEntryDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Struct::Struct_FieldsEntry>
_instance;
} _Struct_FieldsEntry_default_instance_; } _Struct_FieldsEntry_default_instance_;
class StructDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Struct> { class StructDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Struct>
_instance;
} _Struct_default_instance_; } _Struct_default_instance_;
class ValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Value> { class ValueDefaultTypeInternal {
public: public:
::google::protobuf::internal::ExplicitlyConstructed<Value>
_instance;
int null_value_; int null_value_;
double number_value_; double number_value_;
::google::protobuf::internal::ArenaStringPtr string_value_; ::google::protobuf::internal::ArenaStringPtr string_value_;
...@@ -32,7 +40,10 @@ class ValueDefaultTypeInternal : public ::google::protobuf::internal::Explicitly ...@@ -32,7 +40,10 @@ class ValueDefaultTypeInternal : public ::google::protobuf::internal::Explicitly
const ::google::protobuf::Struct* struct_value_; const ::google::protobuf::Struct* struct_value_;
const ::google::protobuf::ListValue* list_value_; const ::google::protobuf::ListValue* list_value_;
} _Value_default_instance_; } _Value_default_instance_;
class ListValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<ListValue> { class ListValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<ListValue>
_instance;
} _ListValue_default_instance_; } _ListValue_default_instance_;
namespace protobuf_google_2fprotobuf_2fstruct_2eproto { namespace protobuf_google_2fprotobuf_2fstruct_2eproto {
...@@ -109,7 +120,7 @@ void protobuf_AssignDescriptors() { ...@@ -109,7 +120,7 @@ void protobuf_AssignDescriptors() {
AssignDescriptors( AssignDescriptors(
"google/protobuf/struct.proto", schemas, file_default_instances, TableStruct::offsets, factory, "google/protobuf/struct.proto", schemas, file_default_instances, TableStruct::offsets, factory,
file_level_metadata, file_level_enum_descriptors, NULL); file_level_metadata, file_level_enum_descriptors, NULL);
file_level_metadata[0].reflection = Struct::Struct_FieldsEntry::CreateReflection(file_level_metadata[0].descriptor, _Struct_FieldsEntry_default_instance_.get_mutable()); file_level_metadata[0].reflection = Struct::Struct_FieldsEntry::CreateReflection(file_level_metadata[0].descriptor, _Struct_FieldsEntry_default_instance_._instance.get_mutable());
} }
void protobuf_AssignDescriptorsOnce() { void protobuf_AssignDescriptorsOnce() {
...@@ -128,16 +139,16 @@ void TableStruct::InitDefaultsImpl() { ...@@ -128,16 +139,16 @@ void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION; GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults(); ::google::protobuf::internal::InitProtobufDefaults();
_Struct_FieldsEntry_default_instance_.DefaultConstruct(); _Struct_FieldsEntry_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_Struct_FieldsEntry_default_instance_);_Struct_default_instance_.DefaultConstruct(); &_Struct_FieldsEntry_default_instance_);_Struct_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_Struct_default_instance_);_Value_default_instance_.DefaultConstruct(); &_Struct_default_instance_);_Value_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_Value_default_instance_);_ListValue_default_instance_.DefaultConstruct(); &_Value_default_instance_);_ListValue_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_ListValue_default_instance_);_Struct_FieldsEntry_default_instance_.get_mutable()->set_default_instance(_Struct_FieldsEntry_default_instance_.get_mutable()); &_ListValue_default_instance_);_Struct_FieldsEntry_default_instance_._instance.get_mutable()->set_default_instance(_Struct_FieldsEntry_default_instance_._instance.get_mutable());
_Struct_FieldsEntry_default_instance_.get_mutable()->InitAsDefaultInstance(); _Struct_FieldsEntry_default_instance_._instance.get_mutable()->InitAsDefaultInstance();
_Value_default_instance_.null_value_ = 0; _Value_default_instance_.null_value_ = 0;
_Value_default_instance_.number_value_ = 0; _Value_default_instance_.number_value_ = 0;
_Value_default_instance_.string_value_.UnsafeSetDefault( _Value_default_instance_.string_value_.UnsafeSetDefault(
......
...@@ -19,7 +19,10 @@ ...@@ -19,7 +19,10 @@
namespace google { namespace google {
namespace protobuf { namespace protobuf {
class TimestampDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Timestamp> { class TimestampDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Timestamp>
_instance;
} _Timestamp_default_instance_; } _Timestamp_default_instance_;
namespace protobuf_google_2fprotobuf_2ftimestamp_2eproto { namespace protobuf_google_2fprotobuf_2ftimestamp_2eproto {
...@@ -88,7 +91,7 @@ void TableStruct::InitDefaultsImpl() { ...@@ -88,7 +91,7 @@ void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION; GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults(); ::google::protobuf::internal::InitProtobufDefaults();
_Timestamp_default_instance_.DefaultConstruct(); _Timestamp_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_Timestamp_default_instance_);} &_Timestamp_default_instance_);}
......
...@@ -19,15 +19,30 @@ ...@@ -19,15 +19,30 @@
namespace google { namespace google {
namespace protobuf { namespace protobuf {
class TypeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Type> { class TypeDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Type>
_instance;
} _Type_default_instance_; } _Type_default_instance_;
class FieldDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Field> { class FieldDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Field>
_instance;
} _Field_default_instance_; } _Field_default_instance_;
class EnumDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Enum> { class EnumDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Enum>
_instance;
} _Enum_default_instance_; } _Enum_default_instance_;
class EnumValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<EnumValue> { class EnumValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<EnumValue>
_instance;
} _EnumValue_default_instance_; } _EnumValue_default_instance_;
class OptionDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Option> { class OptionDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Option>
_instance;
} _Option_default_instance_; } _Option_default_instance_;
namespace protobuf_google_2fprotobuf_2ftype_2eproto { namespace protobuf_google_2fprotobuf_2ftype_2eproto {
...@@ -155,21 +170,21 @@ void TableStruct::InitDefaultsImpl() { ...@@ -155,21 +170,21 @@ void TableStruct::InitDefaultsImpl() {
::google::protobuf::internal::InitProtobufDefaults(); ::google::protobuf::internal::InitProtobufDefaults();
::google::protobuf::protobuf_google_2fprotobuf_2fany_2eproto::InitDefaults(); ::google::protobuf::protobuf_google_2fprotobuf_2fany_2eproto::InitDefaults();
::google::protobuf::protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto::InitDefaults(); ::google::protobuf::protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto::InitDefaults();
_Type_default_instance_.DefaultConstruct(); _Type_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_Type_default_instance_);_Field_default_instance_.DefaultConstruct(); &_Type_default_instance_);_Field_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_Field_default_instance_);_Enum_default_instance_.DefaultConstruct(); &_Field_default_instance_);_Enum_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_Enum_default_instance_);_EnumValue_default_instance_.DefaultConstruct(); &_Enum_default_instance_);_EnumValue_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_EnumValue_default_instance_);_Option_default_instance_.DefaultConstruct(); &_EnumValue_default_instance_);_Option_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_Option_default_instance_);_Type_default_instance_.get_mutable()->source_context_ = const_cast< ::google::protobuf::SourceContext*>( &_Option_default_instance_);_Type_default_instance_._instance.get_mutable()->source_context_ = const_cast< ::google::protobuf::SourceContext*>(
::google::protobuf::SourceContext::internal_default_instance()); ::google::protobuf::SourceContext::internal_default_instance());
_Enum_default_instance_.get_mutable()->source_context_ = const_cast< ::google::protobuf::SourceContext*>( _Enum_default_instance_._instance.get_mutable()->source_context_ = const_cast< ::google::protobuf::SourceContext*>(
::google::protobuf::SourceContext::internal_default_instance()); ::google::protobuf::SourceContext::internal_default_instance());
_Option_default_instance_.get_mutable()->value_ = const_cast< ::google::protobuf::Any*>( _Option_default_instance_._instance.get_mutable()->value_ = const_cast< ::google::protobuf::Any*>(
::google::protobuf::Any::internal_default_instance()); ::google::protobuf::Any::internal_default_instance());
} }
......
...@@ -19,23 +19,50 @@ ...@@ -19,23 +19,50 @@
namespace google { namespace google {
namespace protobuf { namespace protobuf {
class DoubleValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<DoubleValue> { class DoubleValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<DoubleValue>
_instance;
} _DoubleValue_default_instance_; } _DoubleValue_default_instance_;
class FloatValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<FloatValue> { class FloatValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<FloatValue>
_instance;
} _FloatValue_default_instance_; } _FloatValue_default_instance_;
class Int64ValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Int64Value> { class Int64ValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Int64Value>
_instance;
} _Int64Value_default_instance_; } _Int64Value_default_instance_;
class UInt64ValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<UInt64Value> { class UInt64ValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<UInt64Value>
_instance;
} _UInt64Value_default_instance_; } _UInt64Value_default_instance_;
class Int32ValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Int32Value> { class Int32ValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Int32Value>
_instance;
} _Int32Value_default_instance_; } _Int32Value_default_instance_;
class UInt32ValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<UInt32Value> { class UInt32ValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<UInt32Value>
_instance;
} _UInt32Value_default_instance_; } _UInt32Value_default_instance_;
class BoolValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<BoolValue> { class BoolValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<BoolValue>
_instance;
} _BoolValue_default_instance_; } _BoolValue_default_instance_;
class StringValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<StringValue> { class StringValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<StringValue>
_instance;
} _StringValue_default_instance_; } _StringValue_default_instance_;
class BytesValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<BytesValue> { class BytesValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<BytesValue>
_instance;
} _BytesValue_default_instance_; } _BytesValue_default_instance_;
namespace protobuf_google_2fprotobuf_2fwrappers_2eproto { namespace protobuf_google_2fprotobuf_2fwrappers_2eproto {
...@@ -175,23 +202,23 @@ void TableStruct::InitDefaultsImpl() { ...@@ -175,23 +202,23 @@ void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION; GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults(); ::google::protobuf::internal::InitProtobufDefaults();
_DoubleValue_default_instance_.DefaultConstruct(); _DoubleValue_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_DoubleValue_default_instance_);_FloatValue_default_instance_.DefaultConstruct(); &_DoubleValue_default_instance_);_FloatValue_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_FloatValue_default_instance_);_Int64Value_default_instance_.DefaultConstruct(); &_FloatValue_default_instance_);_Int64Value_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_Int64Value_default_instance_);_UInt64Value_default_instance_.DefaultConstruct(); &_Int64Value_default_instance_);_UInt64Value_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_UInt64Value_default_instance_);_Int32Value_default_instance_.DefaultConstruct(); &_UInt64Value_default_instance_);_Int32Value_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_Int32Value_default_instance_);_UInt32Value_default_instance_.DefaultConstruct(); &_Int32Value_default_instance_);_UInt32Value_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_UInt32Value_default_instance_);_BoolValue_default_instance_.DefaultConstruct(); &_UInt32Value_default_instance_);_BoolValue_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_BoolValue_default_instance_);_StringValue_default_instance_.DefaultConstruct(); &_BoolValue_default_instance_);_StringValue_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_StringValue_default_instance_);_BytesValue_default_instance_.DefaultConstruct(); &_StringValue_default_instance_);_BytesValue_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage( ::google::protobuf::internal::OnShutdownDestroyMessage(
&_BytesValue_default_instance_);} &_BytesValue_default_instance_);}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment