diff --git a/src/google/protobuf/any.pb.cc b/src/google/protobuf/any.pb.cc index 9d632efeef..d0fc2905bd 100644 --- a/src/google/protobuf/any.pb.cc +++ b/src/google/protobuf/any.pb.cc @@ -66,14 +66,14 @@ static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast(&::google::protobuf::_Any_default_instance_), }; -void protobuf_AssignDescriptors() { +static void protobuf_AssignDescriptors() { AddDescriptors(); AssignDescriptors( "google/protobuf/any.proto", schemas, file_default_instances, TableStruct::offsets, file_level_metadata, NULL, NULL); } -void protobuf_AssignDescriptorsOnce() { +static void protobuf_AssignDescriptorsOnce() { static ::google::protobuf::internal::once_flag once; ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); } @@ -84,7 +84,7 @@ void protobuf_RegisterTypes(const ::std::string&) { ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); } -void AddDescriptorsImpl() { +static void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\031google/protobuf/any.proto\022\017google.prot" diff --git a/src/google/protobuf/api.pb.cc b/src/google/protobuf/api.pb.cc index e0a249d041..6ad9f48dfa 100644 --- a/src/google/protobuf/api.pb.cc +++ b/src/google/protobuf/api.pb.cc @@ -149,14 +149,14 @@ static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast(&::google::protobuf::_Mixin_default_instance_), }; -void protobuf_AssignDescriptors() { +static void protobuf_AssignDescriptors() { AddDescriptors(); AssignDescriptors( "google/protobuf/api.proto", schemas, file_default_instances, TableStruct::offsets, file_level_metadata, NULL, NULL); } -void protobuf_AssignDescriptorsOnce() { +static void protobuf_AssignDescriptorsOnce() { static ::google::protobuf::internal::once_flag once; ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); } @@ -167,7 +167,7 @@ void protobuf_RegisterTypes(const ::std::string&) { ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 3); } -void AddDescriptorsImpl() { +static void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\031google/protobuf/api.proto\022\017google.prot" diff --git a/src/google/protobuf/compiler/cpp/cpp_file.cc b/src/google/protobuf/compiler/cpp/cpp_file.cc index 42525687d5..02f360bb0e 100644 --- a/src/google/protobuf/compiler/cpp/cpp_file.cc +++ b/src/google/protobuf/compiler/cpp/cpp_file.cc @@ -791,7 +791,7 @@ void FileGenerator::GenerateReflectionInitializationCode(io::Printer* printer) { // AssignDescriptors(). All later times, waits for the first call to // complete and then returns. printer->Print( - "void protobuf_AssignDescriptors() {\n" + "static void protobuf_AssignDescriptors() {\n" // Make sure the file has found its way into the pool. If a descriptor // is requested *during* static init then AddDescriptors() may not have // been called yet, so we call it manually. Note that it's fine if @@ -812,7 +812,7 @@ void FileGenerator::GenerateReflectionInitializationCode(io::Printer* printer) { printer->Print( "}\n" "\n" - "void protobuf_AssignDescriptorsOnce() {\n" + "static void protobuf_AssignDescriptorsOnce() {\n" " static ::google::protobuf::internal::once_flag once;\n" " ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);\n" "}\n" @@ -850,7 +850,7 @@ void FileGenerator::GenerateReflectionInitializationCode(io::Printer* printer) { // Now generate the AddDescriptors() function. printer->Print( - "void AddDescriptorsImpl() {\n" + "static void AddDescriptorsImpl() {\n" " InitDefaults();\n"); printer->Indent(); diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc index ef52def36c..20aa82c7eb 100644 --- a/src/google/protobuf/compiler/plugin.pb.cc +++ b/src/google/protobuf/compiler/plugin.pb.cc @@ -183,14 +183,14 @@ static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast(&::google::protobuf::compiler::_CodeGeneratorResponse_default_instance_), }; -void protobuf_AssignDescriptors() { +static void protobuf_AssignDescriptors() { AddDescriptors(); AssignDescriptors( "google/protobuf/compiler/plugin.proto", schemas, file_default_instances, TableStruct::offsets, file_level_metadata, NULL, NULL); } -void protobuf_AssignDescriptorsOnce() { +static void protobuf_AssignDescriptorsOnce() { static ::google::protobuf::internal::once_flag once; ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); } @@ -201,7 +201,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%google/protobuf/compiler/plugin.proto\022" diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc index 59b04abae1..32ef623f47 100644 --- a/src/google/protobuf/descriptor.pb.cc +++ b/src/google/protobuf/descriptor.pb.cc @@ -1077,14 +1077,14 @@ static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast(&::google::protobuf::_GeneratedCodeInfo_default_instance_), }; -void protobuf_AssignDescriptors() { +static void protobuf_AssignDescriptors() { AddDescriptors(); AssignDescriptors( "google/protobuf/descriptor.proto", schemas, file_default_instances, TableStruct::offsets, file_level_metadata, file_level_enum_descriptors, NULL); } -void protobuf_AssignDescriptorsOnce() { +static void protobuf_AssignDescriptorsOnce() { static ::google::protobuf::internal::once_flag once; ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); } @@ -1095,7 +1095,7 @@ void protobuf_RegisterTypes(const ::std::string&) { ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 27); } -void AddDescriptorsImpl() { +static void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n google/protobuf/descriptor.proto\022\017goog" diff --git a/src/google/protobuf/duration.pb.cc b/src/google/protobuf/duration.pb.cc index ddc063db12..0c67f86ec0 100644 --- a/src/google/protobuf/duration.pb.cc +++ b/src/google/protobuf/duration.pb.cc @@ -66,14 +66,14 @@ static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast(&::google::protobuf::_Duration_default_instance_), }; -void protobuf_AssignDescriptors() { +static void protobuf_AssignDescriptors() { AddDescriptors(); AssignDescriptors( "google/protobuf/duration.proto", schemas, file_default_instances, TableStruct::offsets, file_level_metadata, NULL, NULL); } -void protobuf_AssignDescriptorsOnce() { +static void protobuf_AssignDescriptorsOnce() { static ::google::protobuf::internal::once_flag once; ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); } @@ -84,7 +84,7 @@ void protobuf_RegisterTypes(const ::std::string&) { ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); } -void AddDescriptorsImpl() { +static void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\036google/protobuf/duration.proto\022\017google" diff --git a/src/google/protobuf/empty.pb.cc b/src/google/protobuf/empty.pb.cc index 9b53c54672..7bc4612166 100644 --- a/src/google/protobuf/empty.pb.cc +++ b/src/google/protobuf/empty.pb.cc @@ -64,14 +64,14 @@ static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast(&::google::protobuf::_Empty_default_instance_), }; -void protobuf_AssignDescriptors() { +static void protobuf_AssignDescriptors() { AddDescriptors(); AssignDescriptors( "google/protobuf/empty.proto", schemas, file_default_instances, TableStruct::offsets, file_level_metadata, NULL, NULL); } -void protobuf_AssignDescriptorsOnce() { +static void protobuf_AssignDescriptorsOnce() { static ::google::protobuf::internal::once_flag once; ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); } @@ -82,7 +82,7 @@ void protobuf_RegisterTypes(const ::std::string&) { ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); } -void AddDescriptorsImpl() { +static void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\033google/protobuf/empty.proto\022\017google.pr" diff --git a/src/google/protobuf/field_mask.pb.cc b/src/google/protobuf/field_mask.pb.cc index 000fa8d33a..2ce061d92f 100644 --- a/src/google/protobuf/field_mask.pb.cc +++ b/src/google/protobuf/field_mask.pb.cc @@ -65,14 +65,14 @@ static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast(&::google::protobuf::_FieldMask_default_instance_), }; -void protobuf_AssignDescriptors() { +static void protobuf_AssignDescriptors() { AddDescriptors(); AssignDescriptors( "google/protobuf/field_mask.proto", schemas, file_default_instances, TableStruct::offsets, file_level_metadata, NULL, NULL); } -void protobuf_AssignDescriptorsOnce() { +static void protobuf_AssignDescriptorsOnce() { static ::google::protobuf::internal::once_flag once; ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); } @@ -83,7 +83,7 @@ void protobuf_RegisterTypes(const ::std::string&) { ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); } -void AddDescriptorsImpl() { +static void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n google/protobuf/field_mask.proto\022\017goog" diff --git a/src/google/protobuf/source_context.pb.cc b/src/google/protobuf/source_context.pb.cc index 739172f844..af93e6b20c 100644 --- a/src/google/protobuf/source_context.pb.cc +++ b/src/google/protobuf/source_context.pb.cc @@ -65,14 +65,14 @@ static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast(&::google::protobuf::_SourceContext_default_instance_), }; -void protobuf_AssignDescriptors() { +static void protobuf_AssignDescriptors() { AddDescriptors(); AssignDescriptors( "google/protobuf/source_context.proto", schemas, file_default_instances, TableStruct::offsets, file_level_metadata, NULL, NULL); } -void protobuf_AssignDescriptorsOnce() { +static void protobuf_AssignDescriptorsOnce() { static ::google::protobuf::internal::once_flag once; ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); } @@ -83,7 +83,7 @@ void protobuf_RegisterTypes(const ::std::string&) { ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); } -void AddDescriptorsImpl() { +static void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n$google/protobuf/source_context.proto\022\017" diff --git a/src/google/protobuf/struct.pb.cc b/src/google/protobuf/struct.pb.cc index 8f2d484818..4bf5d45c43 100644 --- a/src/google/protobuf/struct.pb.cc +++ b/src/google/protobuf/struct.pb.cc @@ -140,14 +140,14 @@ static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast(&::google::protobuf::_ListValue_default_instance_), }; -void protobuf_AssignDescriptors() { +static void protobuf_AssignDescriptors() { AddDescriptors(); AssignDescriptors( "google/protobuf/struct.proto", schemas, file_default_instances, TableStruct::offsets, file_level_metadata, file_level_enum_descriptors, NULL); } -void protobuf_AssignDescriptorsOnce() { +static void protobuf_AssignDescriptorsOnce() { static ::google::protobuf::internal::once_flag once; ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); } @@ -158,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" diff --git a/src/google/protobuf/timestamp.pb.cc b/src/google/protobuf/timestamp.pb.cc index 8e6b5f23f8..3184bd973f 100644 --- a/src/google/protobuf/timestamp.pb.cc +++ b/src/google/protobuf/timestamp.pb.cc @@ -66,14 +66,14 @@ static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast(&::google::protobuf::_Timestamp_default_instance_), }; -void protobuf_AssignDescriptors() { +static void protobuf_AssignDescriptors() { AddDescriptors(); AssignDescriptors( "google/protobuf/timestamp.proto", schemas, file_default_instances, TableStruct::offsets, file_level_metadata, NULL, NULL); } -void protobuf_AssignDescriptorsOnce() { +static void protobuf_AssignDescriptorsOnce() { static ::google::protobuf::internal::once_flag once; ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); } @@ -84,7 +84,7 @@ void protobuf_RegisterTypes(const ::std::string&) { ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); } -void AddDescriptorsImpl() { +static void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\037google/protobuf/timestamp.proto\022\017googl" diff --git a/src/google/protobuf/type.pb.cc b/src/google/protobuf/type.pb.cc index 130af52a30..17d5ce2a6f 100644 --- a/src/google/protobuf/type.pb.cc +++ b/src/google/protobuf/type.pb.cc @@ -219,14 +219,14 @@ static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast(&::google::protobuf::_Option_default_instance_), }; -void protobuf_AssignDescriptors() { +static void protobuf_AssignDescriptors() { AddDescriptors(); AssignDescriptors( "google/protobuf/type.proto", schemas, file_default_instances, TableStruct::offsets, file_level_metadata, file_level_enum_descriptors, NULL); } -void protobuf_AssignDescriptorsOnce() { +static void protobuf_AssignDescriptorsOnce() { static ::google::protobuf::internal::once_flag once; ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); } @@ -237,7 +237,7 @@ void protobuf_RegisterTypes(const ::std::string&) { ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 5); } -void AddDescriptorsImpl() { +static void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\032google/protobuf/type.proto\022\017google.pro" diff --git a/src/google/protobuf/wrappers.pb.cc b/src/google/protobuf/wrappers.pb.cc index ffd905f507..386be61d5c 100644 --- a/src/google/protobuf/wrappers.pb.cc +++ b/src/google/protobuf/wrappers.pb.cc @@ -289,14 +289,14 @@ static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast(&::google::protobuf::_BytesValue_default_instance_), }; -void protobuf_AssignDescriptors() { +static void protobuf_AssignDescriptors() { AddDescriptors(); AssignDescriptors( "google/protobuf/wrappers.proto", schemas, file_default_instances, TableStruct::offsets, file_level_metadata, NULL, NULL); } -void protobuf_AssignDescriptorsOnce() { +static void protobuf_AssignDescriptorsOnce() { static ::google::protobuf::internal::once_flag once; ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); } @@ -307,7 +307,7 @@ void protobuf_RegisterTypes(const ::std::string&) { ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 9); } -void AddDescriptorsImpl() { +static void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\036google/protobuf/wrappers.proto\022\017google"