Fix invalid offsetof warning.

Use composition instead of inheritance for oneof default.
pull/3450/head
Jisi Liu 7 years ago
parent 7781784796
commit 4cbbf33b77
  1. 2
      src/Makefile.am
  2. 7
      src/google/protobuf/any.pb.cc
  3. 23
      src/google/protobuf/api.pb.cc
  4. 9
      src/google/protobuf/compiler/cpp/cpp_file.cc
  5. 12
      src/google/protobuf/compiler/cpp/cpp_message.cc
  6. 30
      src/google/protobuf/compiler/plugin.pb.cc
  7. 202
      src/google/protobuf/descriptor.pb.cc
  8. 7
      src/google/protobuf/duration.pb.cc
  9. 7
      src/google/protobuf/empty.pb.cc
  10. 7
      src/google/protobuf/field_mask.pb.cc
  11. 7
      src/google/protobuf/source_context.pb.cc
  12. 35
      src/google/protobuf/struct.pb.cc
  13. 7
      src/google/protobuf/timestamp.pb.cc
  14. 41
      src/google/protobuf/type.pb.cc
  15. 63
      src/google/protobuf/wrappers.pb.cc

@ -930,7 +930,7 @@ no_warning_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
../gmock/gtest/lib/libgtest_main.la
no_warning_test_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include
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)
TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \

@ -19,7 +19,10 @@
namespace google {
namespace protobuf {
class AnyDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Any> {
class AnyDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Any>
_instance;
} _Any_default_instance_;
namespace protobuf_google_2fprotobuf_2fany_2eproto {
@ -88,7 +91,7 @@ void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults();
_Any_default_instance_.DefaultConstruct();
_Any_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_Any_default_instance_);}

@ -19,11 +19,20 @@
namespace google {
namespace protobuf {
class ApiDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Api> {
class ApiDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Api>
_instance;
} _Api_default_instance_;
class MethodDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Method> {
class MethodDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Method>
_instance;
} _Method_default_instance_;
class MixinDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Mixin> {
class MixinDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Mixin>
_instance;
} _Mixin_default_instance_;
namespace protobuf_google_2fprotobuf_2fapi_2eproto {
@ -124,13 +133,13 @@ void TableStruct::InitDefaultsImpl() {
::google::protobuf::internal::InitProtobufDefaults();
::google::protobuf::protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto::InitDefaults();
::google::protobuf::protobuf_google_2fprotobuf_2ftype_2eproto::InitDefaults();
_Api_default_instance_.DefaultConstruct();
_Api_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_Api_default_instance_);_Method_default_instance_.DefaultConstruct();
&_Api_default_instance_);_Method_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_Method_default_instance_);_Mixin_default_instance_.DefaultConstruct();
&_Method_default_instance_);_Mixin_default_instance_._instance.DefaultConstruct();
::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());
}

@ -351,9 +351,10 @@ void FileGenerator::GenerateSource(io::Printer* printer) {
"::";
}
printer->Print(
"class $classname$DefaultTypeInternal : "
"public ::google::protobuf::internal::ExplicitlyConstructed<$parent$$classname$> "
"{\n",
"class $classname$DefaultTypeInternal {\n"
"public:\n"
" ::google::protobuf::internal::ExplicitlyConstructed<$parent$$classname$>\n"
" _instance;\n",
"parent", parent, "classname", message_generators_[i]->classname_);
printer->Indent();
message_generators_[i]->GenerateExtraDefaultFields(printer);
@ -740,7 +741,7 @@ void FileGenerator::GenerateBuildDescriptors(io::Printer* printer) {
printer->Print(
"file_level_metadata[$index$].reflection = "
"$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",
ClassName(message_generators_[i]->descriptor_->containing_type(),
false),

@ -1604,7 +1604,6 @@ GenerateExtraDefaultFields(io::Printer* printer) {
// Generate oneof default instance and weak field instances for reflection
// usage.
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 j = 0; j < descriptor_->oneof_decl(i)->field_count(); j++) {
const FieldDescriptor* field = descriptor_->oneof_decl(i)->field(j);
@ -1977,7 +1976,7 @@ GenerateDefaultInstanceAllocator(io::Printer* printer) {
// Construct the default instance. We can't call InitAsDefaultInstance() yet
// because we need to make sure all default instances that this one might
// 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"
" &_$classname$_default_instance_);",
"classname", classname_);
@ -1987,9 +1986,9 @@ void MessageGenerator::
GenerateDefaultInstanceInitializer(io::Printer* printer) {
if (IsMapEntryMessage(descriptor_)) {
printer->Print(
"_$classname$_default_instance_.get_mutable()->set_default_instance(_$"
"classname$_default_instance_.get_mutable());\n"
"_$classname$_default_instance_.get_mutable()->InitAsDefaultInstance();"
"_$classname$_default_instance_._instance.get_mutable()->set_default_instance(_$"
"classname$_default_instance_._instance.get_mutable());\n"
"_$classname$_default_instance_._instance.get_mutable()->InitAsDefaultInstance();"
"\n",
"classname", classname_);
return;
@ -2012,7 +2011,8 @@ GenerateDefaultInstanceInitializer(io::Printer* printer) {
if (field->containing_oneof() || field->options().weak()) {
name = "_" + classname_ + "_default_instance_.";
} else {
name = "_" + classname_ + "_default_instance_.get_mutable()->";
name =
"_" + classname_ + "_default_instance_._instance.get_mutable()->";
}
name += FieldName(field);
printer->Print(

@ -20,13 +20,25 @@
namespace google {
namespace protobuf {
namespace compiler {
class VersionDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Version> {
class VersionDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Version>
_instance;
} _Version_default_instance_;
class CodeGeneratorRequestDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<CodeGeneratorRequest> {
class CodeGeneratorRequestDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<CodeGeneratorRequest>
_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_;
class CodeGeneratorResponseDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<CodeGeneratorResponse> {
class CodeGeneratorResponseDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<CodeGeneratorResponse>
_instance;
} _CodeGeneratorResponse_default_instance_;
namespace protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto {
@ -144,15 +156,15 @@ void TableStruct::InitDefaultsImpl() {
::google::protobuf::internal::InitProtobufDefaults();
::google::protobuf::protobuf_google_2fprotobuf_2fdescriptor_2eproto::InitDefaults();
_Version_default_instance_.DefaultConstruct();
_Version_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_Version_default_instance_);_CodeGeneratorRequest_default_instance_.DefaultConstruct();
&_Version_default_instance_);_CodeGeneratorRequest_default_instance_._instance.DefaultConstruct();
::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(
&_CodeGeneratorResponse_File_default_instance_);_CodeGeneratorResponse_default_instance_.DefaultConstruct();
&_CodeGeneratorResponse_File_default_instance_);_CodeGeneratorResponse_default_instance_._instance.DefaultConstruct();
::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());
}

@ -19,57 +19,135 @@
namespace google {
namespace protobuf {
class FileDescriptorSetDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<FileDescriptorSet> {
class FileDescriptorSetDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<FileDescriptorSet>
_instance;
} _FileDescriptorSet_default_instance_;
class FileDescriptorProtoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<FileDescriptorProto> {
class FileDescriptorProtoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<FileDescriptorProto>
_instance;
} _FileDescriptorProto_default_instance_;
class DescriptorProto_ExtensionRangeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<DescriptorProto_ExtensionRange> {
class DescriptorProto_ExtensionRangeDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<DescriptorProto_ExtensionRange>
_instance;
} _DescriptorProto_ExtensionRange_default_instance_;
class DescriptorProto_ReservedRangeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<DescriptorProto_ReservedRange> {
class DescriptorProto_ReservedRangeDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<DescriptorProto_ReservedRange>
_instance;
} _DescriptorProto_ReservedRange_default_instance_;
class DescriptorProtoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<DescriptorProto> {
class DescriptorProtoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<DescriptorProto>
_instance;
} _DescriptorProto_default_instance_;
class ExtensionRangeOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<ExtensionRangeOptions> {
class ExtensionRangeOptionsDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<ExtensionRangeOptions>
_instance;
} _ExtensionRangeOptions_default_instance_;
class FieldDescriptorProtoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<FieldDescriptorProto> {
class FieldDescriptorProtoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<FieldDescriptorProto>
_instance;
} _FieldDescriptorProto_default_instance_;
class OneofDescriptorProtoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<OneofDescriptorProto> {
class OneofDescriptorProtoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<OneofDescriptorProto>
_instance;
} _OneofDescriptorProto_default_instance_;
class EnumDescriptorProtoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<EnumDescriptorProto> {
class EnumDescriptorProtoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<EnumDescriptorProto>
_instance;
} _EnumDescriptorProto_default_instance_;
class EnumValueDescriptorProtoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<EnumValueDescriptorProto> {
class EnumValueDescriptorProtoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<EnumValueDescriptorProto>
_instance;
} _EnumValueDescriptorProto_default_instance_;
class ServiceDescriptorProtoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<ServiceDescriptorProto> {
class ServiceDescriptorProtoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<ServiceDescriptorProto>
_instance;
} _ServiceDescriptorProto_default_instance_;
class MethodDescriptorProtoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<MethodDescriptorProto> {
class MethodDescriptorProtoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<MethodDescriptorProto>
_instance;
} _MethodDescriptorProto_default_instance_;
class FileOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<FileOptions> {
class FileOptionsDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<FileOptions>
_instance;
} _FileOptions_default_instance_;
class MessageOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<MessageOptions> {
class MessageOptionsDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<MessageOptions>
_instance;
} _MessageOptions_default_instance_;
class FieldOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<FieldOptions> {
class FieldOptionsDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<FieldOptions>
_instance;
} _FieldOptions_default_instance_;
class OneofOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<OneofOptions> {
class OneofOptionsDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<OneofOptions>
_instance;
} _OneofOptions_default_instance_;
class EnumOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<EnumOptions> {
class EnumOptionsDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<EnumOptions>
_instance;
} _EnumOptions_default_instance_;
class EnumValueOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<EnumValueOptions> {
class EnumValueOptionsDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<EnumValueOptions>
_instance;
} _EnumValueOptions_default_instance_;
class ServiceOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<ServiceOptions> {
class ServiceOptionsDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<ServiceOptions>
_instance;
} _ServiceOptions_default_instance_;
class MethodOptionsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<MethodOptions> {
class MethodOptionsDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<MethodOptions>
_instance;
} _MethodOptions_default_instance_;
class UninterpretedOption_NamePartDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<UninterpretedOption_NamePart> {
class UninterpretedOption_NamePartDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<UninterpretedOption_NamePart>
_instance;
} _UninterpretedOption_NamePart_default_instance_;
class UninterpretedOptionDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<UninterpretedOption> {
class UninterpretedOptionDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<UninterpretedOption>
_instance;
} _UninterpretedOption_default_instance_;
class SourceCodeInfo_LocationDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<SourceCodeInfo_Location> {
class SourceCodeInfo_LocationDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<SourceCodeInfo_Location>
_instance;
} _SourceCodeInfo_Location_default_instance_;
class SourceCodeInfoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<SourceCodeInfo> {
class SourceCodeInfoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<SourceCodeInfo>
_instance;
} _SourceCodeInfo_default_instance_;
class GeneratedCodeInfo_AnnotationDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<GeneratedCodeInfo_Annotation> {
class GeneratedCodeInfo_AnnotationDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<GeneratedCodeInfo_Annotation>
_instance;
} _GeneratedCodeInfo_Annotation_default_instance_;
class GeneratedCodeInfoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<GeneratedCodeInfo> {
class GeneratedCodeInfoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<GeneratedCodeInfo>
_instance;
} _GeneratedCodeInfo_default_instance_;
namespace protobuf_google_2fprotobuf_2fdescriptor_2eproto {
@ -573,77 +651,77 @@ void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults();
_FileDescriptorSet_default_instance_.DefaultConstruct();
_FileDescriptorSet_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_FileDescriptorSet_default_instance_);_FileDescriptorProto_default_instance_.DefaultConstruct();
&_FileDescriptorSet_default_instance_);_FileDescriptorProto_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_FileDescriptorProto_default_instance_);_DescriptorProto_ExtensionRange_default_instance_.DefaultConstruct();
&_FileDescriptorProto_default_instance_);_DescriptorProto_ExtensionRange_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_DescriptorProto_ExtensionRange_default_instance_);_DescriptorProto_ReservedRange_default_instance_.DefaultConstruct();
&_DescriptorProto_ExtensionRange_default_instance_);_DescriptorProto_ReservedRange_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_DescriptorProto_ReservedRange_default_instance_);_DescriptorProto_default_instance_.DefaultConstruct();
&_DescriptorProto_ReservedRange_default_instance_);_DescriptorProto_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_DescriptorProto_default_instance_);_ExtensionRangeOptions_default_instance_.DefaultConstruct();
&_DescriptorProto_default_instance_);_ExtensionRangeOptions_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_ExtensionRangeOptions_default_instance_);_FieldDescriptorProto_default_instance_.DefaultConstruct();
&_ExtensionRangeOptions_default_instance_);_FieldDescriptorProto_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_FieldDescriptorProto_default_instance_);_OneofDescriptorProto_default_instance_.DefaultConstruct();
&_FieldDescriptorProto_default_instance_);_OneofDescriptorProto_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_OneofDescriptorProto_default_instance_);_EnumDescriptorProto_default_instance_.DefaultConstruct();
&_OneofDescriptorProto_default_instance_);_EnumDescriptorProto_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_EnumDescriptorProto_default_instance_);_EnumValueDescriptorProto_default_instance_.DefaultConstruct();
&_EnumDescriptorProto_default_instance_);_EnumValueDescriptorProto_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_EnumValueDescriptorProto_default_instance_);_ServiceDescriptorProto_default_instance_.DefaultConstruct();
&_EnumValueDescriptorProto_default_instance_);_ServiceDescriptorProto_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_ServiceDescriptorProto_default_instance_);_MethodDescriptorProto_default_instance_.DefaultConstruct();
&_ServiceDescriptorProto_default_instance_);_MethodDescriptorProto_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_MethodDescriptorProto_default_instance_);_FileOptions_default_instance_.DefaultConstruct();
&_MethodDescriptorProto_default_instance_);_FileOptions_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_FileOptions_default_instance_);_MessageOptions_default_instance_.DefaultConstruct();
&_FileOptions_default_instance_);_MessageOptions_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_MessageOptions_default_instance_);_FieldOptions_default_instance_.DefaultConstruct();
&_MessageOptions_default_instance_);_FieldOptions_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_FieldOptions_default_instance_);_OneofOptions_default_instance_.DefaultConstruct();
&_FieldOptions_default_instance_);_OneofOptions_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_OneofOptions_default_instance_);_EnumOptions_default_instance_.DefaultConstruct();
&_OneofOptions_default_instance_);_EnumOptions_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_EnumOptions_default_instance_);_EnumValueOptions_default_instance_.DefaultConstruct();
&_EnumOptions_default_instance_);_EnumValueOptions_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_EnumValueOptions_default_instance_);_ServiceOptions_default_instance_.DefaultConstruct();
&_EnumValueOptions_default_instance_);_ServiceOptions_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_ServiceOptions_default_instance_);_MethodOptions_default_instance_.DefaultConstruct();
&_ServiceOptions_default_instance_);_MethodOptions_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_MethodOptions_default_instance_);_UninterpretedOption_NamePart_default_instance_.DefaultConstruct();
&_MethodOptions_default_instance_);_UninterpretedOption_NamePart_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_UninterpretedOption_NamePart_default_instance_);_UninterpretedOption_default_instance_.DefaultConstruct();
&_UninterpretedOption_NamePart_default_instance_);_UninterpretedOption_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_UninterpretedOption_default_instance_);_SourceCodeInfo_Location_default_instance_.DefaultConstruct();
&_UninterpretedOption_default_instance_);_SourceCodeInfo_Location_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_SourceCodeInfo_Location_default_instance_);_SourceCodeInfo_default_instance_.DefaultConstruct();
&_SourceCodeInfo_Location_default_instance_);_SourceCodeInfo_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_SourceCodeInfo_default_instance_);_GeneratedCodeInfo_Annotation_default_instance_.DefaultConstruct();
&_SourceCodeInfo_default_instance_);_GeneratedCodeInfo_Annotation_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_GeneratedCodeInfo_Annotation_default_instance_);_GeneratedCodeInfo_default_instance_.DefaultConstruct();
&_GeneratedCodeInfo_Annotation_default_instance_);_GeneratedCodeInfo_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_GeneratedCodeInfo_default_instance_);_FileDescriptorProto_default_instance_.get_mutable()->options_ = const_cast< ::google::protobuf::FileOptions*>(
&_GeneratedCodeInfo_default_instance_);_FileDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::FileOptions*>(
::google::protobuf::FileOptions::internal_default_instance());
_FileDescriptorProto_default_instance_.get_mutable()->source_code_info_ = const_cast< ::google::protobuf::SourceCodeInfo*>(
_FileDescriptorProto_default_instance_._instance.get_mutable()->source_code_info_ = const_cast< ::google::protobuf::SourceCodeInfo*>(
::google::protobuf::SourceCodeInfo::internal_default_instance());
_DescriptorProto_ExtensionRange_default_instance_.get_mutable()->options_ = const_cast< ::google::protobuf::ExtensionRangeOptions*>(
_DescriptorProto_ExtensionRange_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::ExtensionRangeOptions*>(
::google::protobuf::ExtensionRangeOptions::internal_default_instance());
_DescriptorProto_default_instance_.get_mutable()->options_ = const_cast< ::google::protobuf::MessageOptions*>(
_DescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::MessageOptions*>(
::google::protobuf::MessageOptions::internal_default_instance());
_FieldDescriptorProto_default_instance_.get_mutable()->options_ = const_cast< ::google::protobuf::FieldOptions*>(
_FieldDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::FieldOptions*>(
::google::protobuf::FieldOptions::internal_default_instance());
_OneofDescriptorProto_default_instance_.get_mutable()->options_ = const_cast< ::google::protobuf::OneofOptions*>(
_OneofDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::OneofOptions*>(
::google::protobuf::OneofOptions::internal_default_instance());
_EnumDescriptorProto_default_instance_.get_mutable()->options_ = const_cast< ::google::protobuf::EnumOptions*>(
_EnumDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::EnumOptions*>(
::google::protobuf::EnumOptions::internal_default_instance());
_EnumValueDescriptorProto_default_instance_.get_mutable()->options_ = const_cast< ::google::protobuf::EnumValueOptions*>(
_EnumValueDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::EnumValueOptions*>(
::google::protobuf::EnumValueOptions::internal_default_instance());
_ServiceDescriptorProto_default_instance_.get_mutable()->options_ = const_cast< ::google::protobuf::ServiceOptions*>(
_ServiceDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::ServiceOptions*>(
::google::protobuf::ServiceOptions::internal_default_instance());
_MethodDescriptorProto_default_instance_.get_mutable()->options_ = const_cast< ::google::protobuf::MethodOptions*>(
_MethodDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::MethodOptions*>(
::google::protobuf::MethodOptions::internal_default_instance());
}

@ -19,7 +19,10 @@
namespace google {
namespace protobuf {
class DurationDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Duration> {
class DurationDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Duration>
_instance;
} _Duration_default_instance_;
namespace protobuf_google_2fprotobuf_2fduration_2eproto {
@ -88,7 +91,7 @@ void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults();
_Duration_default_instance_.DefaultConstruct();
_Duration_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_Duration_default_instance_);}

@ -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 {
@ -86,7 +89,7 @@ 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_);}

@ -19,7 +19,10 @@
namespace google {
namespace protobuf {
class FieldMaskDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<FieldMask> {
class FieldMaskDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<FieldMask>
_instance;
} _FieldMask_default_instance_;
namespace protobuf_google_2fprotobuf_2ffield_5fmask_2eproto {
@ -87,7 +90,7 @@ void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults();
_FieldMask_default_instance_.DefaultConstruct();
_FieldMask_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_FieldMask_default_instance_);}

@ -19,7 +19,10 @@
namespace google {
namespace protobuf {
class SourceContextDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<SourceContext> {
class SourceContextDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<SourceContext>
_instance;
} _SourceContext_default_instance_;
namespace protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto {
@ -87,7 +90,7 @@ void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults();
_SourceContext_default_instance_.DefaultConstruct();
_SourceContext_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_SourceContext_default_instance_);}

@ -19,12 +19,20 @@
namespace google {
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_;
class StructDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Struct> {
class StructDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Struct>
_instance;
} _Struct_default_instance_;
class ValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Value> {
public:
class ValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Value>
_instance;
int null_value_;
double number_value_;
::google::protobuf::internal::ArenaStringPtr string_value_;
@ -32,7 +40,10 @@ class ValueDefaultTypeInternal : public ::google::protobuf::internal::Explicitly
const ::google::protobuf::Struct* struct_value_;
const ::google::protobuf::ListValue* list_value_;
} _Value_default_instance_;
class ListValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<ListValue> {
class ListValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<ListValue>
_instance;
} _ListValue_default_instance_;
namespace protobuf_google_2fprotobuf_2fstruct_2eproto {
@ -109,7 +120,7 @@ void protobuf_AssignDescriptors() {
AssignDescriptors(
"google/protobuf/struct.proto", schemas, file_default_instances, TableStruct::offsets, factory,
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() {
@ -128,16 +139,16 @@ void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults();
_Struct_FieldsEntry_default_instance_.DefaultConstruct();
_Struct_FieldsEntry_default_instance_._instance.DefaultConstruct();
::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(
&_Struct_default_instance_);_Value_default_instance_.DefaultConstruct();
&_Struct_default_instance_);_Value_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_Value_default_instance_);_ListValue_default_instance_.DefaultConstruct();
&_Value_default_instance_);_ListValue_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_ListValue_default_instance_);_Struct_FieldsEntry_default_instance_.get_mutable()->set_default_instance(_Struct_FieldsEntry_default_instance_.get_mutable());
_Struct_FieldsEntry_default_instance_.get_mutable()->InitAsDefaultInstance();
&_ListValue_default_instance_);_Struct_FieldsEntry_default_instance_._instance.get_mutable()->set_default_instance(_Struct_FieldsEntry_default_instance_._instance.get_mutable());
_Struct_FieldsEntry_default_instance_._instance.get_mutable()->InitAsDefaultInstance();
_Value_default_instance_.null_value_ = 0;
_Value_default_instance_.number_value_ = 0;
_Value_default_instance_.string_value_.UnsafeSetDefault(

@ -19,7 +19,10 @@
namespace google {
namespace protobuf {
class TimestampDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Timestamp> {
class TimestampDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Timestamp>
_instance;
} _Timestamp_default_instance_;
namespace protobuf_google_2fprotobuf_2ftimestamp_2eproto {
@ -88,7 +91,7 @@ void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults();
_Timestamp_default_instance_.DefaultConstruct();
_Timestamp_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_Timestamp_default_instance_);}

@ -19,15 +19,30 @@
namespace google {
namespace protobuf {
class TypeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Type> {
class TypeDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Type>
_instance;
} _Type_default_instance_;
class FieldDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Field> {
class FieldDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Field>
_instance;
} _Field_default_instance_;
class EnumDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Enum> {
class EnumDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Enum>
_instance;
} _Enum_default_instance_;
class EnumValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<EnumValue> {
class EnumValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<EnumValue>
_instance;
} _EnumValue_default_instance_;
class OptionDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Option> {
class OptionDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Option>
_instance;
} _Option_default_instance_;
namespace protobuf_google_2fprotobuf_2ftype_2eproto {
@ -155,21 +170,21 @@ void TableStruct::InitDefaultsImpl() {
::google::protobuf::internal::InitProtobufDefaults();
::google::protobuf::protobuf_google_2fprotobuf_2fany_2eproto::InitDefaults();
::google::protobuf::protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto::InitDefaults();
_Type_default_instance_.DefaultConstruct();
_Type_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_Type_default_instance_);_Field_default_instance_.DefaultConstruct();
&_Type_default_instance_);_Field_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_Field_default_instance_);_Enum_default_instance_.DefaultConstruct();
&_Field_default_instance_);_Enum_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_Enum_default_instance_);_EnumValue_default_instance_.DefaultConstruct();
&_Enum_default_instance_);_EnumValue_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_EnumValue_default_instance_);_Option_default_instance_.DefaultConstruct();
&_EnumValue_default_instance_);_Option_default_instance_._instance.DefaultConstruct();
::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());
_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());
_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());
}

@ -19,23 +19,50 @@
namespace google {
namespace protobuf {
class DoubleValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<DoubleValue> {
class DoubleValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<DoubleValue>
_instance;
} _DoubleValue_default_instance_;
class FloatValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<FloatValue> {
class FloatValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<FloatValue>
_instance;
} _FloatValue_default_instance_;
class Int64ValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Int64Value> {
class Int64ValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Int64Value>
_instance;
} _Int64Value_default_instance_;
class UInt64ValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<UInt64Value> {
class UInt64ValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<UInt64Value>
_instance;
} _UInt64Value_default_instance_;
class Int32ValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Int32Value> {
class Int32ValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Int32Value>
_instance;
} _Int32Value_default_instance_;
class UInt32ValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<UInt32Value> {
class UInt32ValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<UInt32Value>
_instance;
} _UInt32Value_default_instance_;
class BoolValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<BoolValue> {
class BoolValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<BoolValue>
_instance;
} _BoolValue_default_instance_;
class StringValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<StringValue> {
class StringValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<StringValue>
_instance;
} _StringValue_default_instance_;
class BytesValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<BytesValue> {
class BytesValueDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<BytesValue>
_instance;
} _BytesValue_default_instance_;
namespace protobuf_google_2fprotobuf_2fwrappers_2eproto {
@ -175,23 +202,23 @@ void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults();
_DoubleValue_default_instance_.DefaultConstruct();
_DoubleValue_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_DoubleValue_default_instance_);_FloatValue_default_instance_.DefaultConstruct();
&_DoubleValue_default_instance_);_FloatValue_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_FloatValue_default_instance_);_Int64Value_default_instance_.DefaultConstruct();
&_FloatValue_default_instance_);_Int64Value_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_Int64Value_default_instance_);_UInt64Value_default_instance_.DefaultConstruct();
&_Int64Value_default_instance_);_UInt64Value_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_UInt64Value_default_instance_);_Int32Value_default_instance_.DefaultConstruct();
&_UInt64Value_default_instance_);_Int32Value_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_Int32Value_default_instance_);_UInt32Value_default_instance_.DefaultConstruct();
&_Int32Value_default_instance_);_UInt32Value_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_UInt32Value_default_instance_);_BoolValue_default_instance_.DefaultConstruct();
&_UInt32Value_default_instance_);_BoolValue_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_BoolValue_default_instance_);_StringValue_default_instance_.DefaultConstruct();
&_BoolValue_default_instance_);_StringValue_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_StringValue_default_instance_);_BytesValue_default_instance_.DefaultConstruct();
&_StringValue_default_instance_);_BytesValue_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_BytesValue_default_instance_);}

Loading…
Cancel
Save