aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2021-09-09 08:23:12 -0700
committerJoshua Haberman <jhaberman@gmail.com>2021-09-09 08:23:12 -0700
commit018e2e77514ce8effef58623e6d823456298efa8 (patch)
tree81bec13ba4416eb640c9c94d89d8403ec7456a31
parent10d0faef6de038960ec825c003c85581800fba1c (diff)
parente5c570bb572bebe706d0389f2ea734a3e1a7d821 (diff)
downloadprotobuf-018e2e77514ce8effef58623e6d823456298efa8.tar.gz
Merge tag 'refs/tags/sync-piper' into sync-stage
# Conflicts: # src/google/protobuf/descriptor.pb.cc # src/google/protobuf/duration.pb.cc # src/google/protobuf/timestamp.pb.cc # src/google/protobuf/type.pb.cc # src/google/protobuf/wrappers.pb.cc
-rw-r--r--cmake/libprotobuf-lite.cmake34
-rw-r--r--cmake/libprotobuf.cmake25
-rw-r--r--cmake/libprotoc.cmake98
-rw-r--r--cmake/tests.cmake18
-rw-r--r--conformance/conformance.proto4
-rw-r--r--[-rwxr-xr-x]conformance/conformance_nodejs.js30
-rw-r--r--conformance/text_format_failure_list_java.txt4
-rw-r--r--csharp/src/Google.Protobuf.Conformance/Conformance.cs2
-rw-r--r--csharp/src/Google.Protobuf.Test/testprotos.pbbin340756 -> 340757 bytes
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs4
-rw-r--r--java/core/src/main/java/com/google/protobuf/ByteString.java21
-rw-r--r--java/core/src/main/java/com/google/protobuf/CodedInputStream.java28
-rw-r--r--java/core/src/main/java/com/google/protobuf/CodedOutputStream.java2
-rw-r--r--java/core/src/main/java/com/google/protobuf/GeneratedMessageV3.java12
-rw-r--r--java/core/src/main/java/com/google/protobuf/MapFieldLite.java2
-rw-r--r--java/core/src/main/java/com/google/protobuf/MessageLite.java9
-rw-r--r--java/core/src/main/java/com/google/protobuf/SchemaUtil.java2
-rw-r--r--java/core/src/main/java/com/google/protobuf/TextFormat.java12
-rw-r--r--java/core/src/test/java/com/google/protobuf/RepeatedFieldBuilderV3Test.java2
-rw-r--r--java/core/src/test/java/com/google/protobuf/TestUtil.java3
-rw-r--r--java/core/src/test/java/com/google/protobuf/TextFormatTest.java42
-rw-r--r--java/core/src/test/proto/com/google/protobuf/map_lite_test.proto2
-rw-r--r--objectivec/GPBStruct.pbobjc.h4
-rw-r--r--php/src/Google/Protobuf/Value.php4
-rw-r--r--python/google/protobuf/descriptor.py3
-rw-r--r--python/google/protobuf/descriptor_pool.py32
-rw-r--r--python/google/protobuf/internal/__init__.py30
-rw-r--r--python/google/protobuf/internal/decoder.py54
-rw-r--r--[-rwxr-xr-x]python/google/protobuf/internal/descriptor_database_test.py7
-rw-r--r--[-rwxr-xr-x]python/google/protobuf/internal/descriptor_pool_test.py22
-rw-r--r--[-rwxr-xr-x]python/google/protobuf/internal/descriptor_test.py21
-rw-r--r--python/google/protobuf/internal/encoder.py11
-rw-r--r--python/google/protobuf/internal/enum_type_wrapper.py4
-rw-r--r--[-rwxr-xr-x]python/google/protobuf/internal/generator_test.py2
-rw-r--r--[-rwxr-xr-x]python/google/protobuf/internal/json_format_test.py17
-rw-r--r--[-rwxr-xr-x]python/google/protobuf/internal/keywords_test.py2
-rw-r--r--[-rwxr-xr-x]python/google/protobuf/internal/message_factory_test.py7
-rw-r--r--[-rwxr-xr-x]python/google/protobuf/internal/message_test.py265
-rw-r--r--python/google/protobuf/internal/more_messages.proto34
-rw-r--r--[-rwxr-xr-x]python/google/protobuf/internal/proto_builder_test.py2
-rw-r--r--python/google/protobuf/internal/python_message.py28
-rw-r--r--[-rwxr-xr-x]python/google/protobuf/internal/reflection_test.py37
-rw-r--r--[-rwxr-xr-x]python/google/protobuf/internal/service_reflection_test.py7
-rw-r--r--[-rwxr-xr-x]python/google/protobuf/internal/symbol_database_test.py7
-rw-r--r--python/google/protobuf/internal/testing_refleaks.py12
-rw-r--r--[-rwxr-xr-x]python/google/protobuf/internal/text_encoding_test.py7
-rw-r--r--[-rwxr-xr-x]python/google/protobuf/internal/text_format_test.py239
-rw-r--r--python/google/protobuf/internal/type_checkers.py34
-rw-r--r--[-rwxr-xr-x]python/google/protobuf/internal/unknown_fields_test.py8
-rw-r--r--[-rwxr-xr-x]python/google/protobuf/internal/well_known_types_test.py16
-rw-r--r--[-rwxr-xr-x]python/google/protobuf/internal/wire_format_test.py7
-rw-r--r--python/google/protobuf/json_format.py27
-rw-r--r--python/google/protobuf/message_factory.py2
-rw-r--r--python/google/protobuf/proto_builder.py5
-rw-r--r--python/google/protobuf/text_encoding.py19
-rw-r--r--python/google/protobuf/text_format.py55
-rw-r--r--src/Makefile.am72
-rw-r--r--src/google/protobuf/any.pb.cc32
-rw-r--r--src/google/protobuf/any.pb.h16
-rw-r--r--src/google/protobuf/api.pb.cc122
-rw-r--r--src/google/protobuf/api.pb.h49
-rw-r--r--src/google/protobuf/arena.h18
-rw-r--r--src/google/protobuf/arena_impl.h23
-rw-r--r--src/google/protobuf/arena_unittest.cc2
-rw-r--r--src/google/protobuf/compiler/annotation_test_util.h4
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_extension.cc15
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_file.cc3
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_helpers.cc28
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_message.cc9
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_names.h6
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_string_field.cc23
-rw-r--r--src/google/protobuf/compiler/java/java_doc_comment.cc19
-rw-r--r--src/google/protobuf/compiler/plugin.pb.cc124
-rw-r--r--src/google/protobuf/compiler/plugin.pb.h150
-rw-r--r--src/google/protobuf/compiler/python/python_generator.cc387
-rw-r--r--src/google/protobuf/compiler/python/python_generator.h25
-rw-r--r--src/google/protobuf/descriptor.pb.cc856
-rw-r--r--src/google/protobuf/descriptor.pb.h864
-rw-r--r--src/google/protobuf/duration.pb.cc20
-rw-r--r--src/google/protobuf/duration.pb.h42
-rw-r--r--src/google/protobuf/empty.pb.cc2
-rw-r--r--src/google/protobuf/empty.pb.h2
-rw-r--r--src/google/protobuf/extension_set.h20
-rw-r--r--src/google/protobuf/field_mask.pb.cc18
-rw-r--r--src/google/protobuf/field_mask.pb.h6
-rw-r--r--src/google/protobuf/port_def.inc6
-rw-r--r--src/google/protobuf/port_undef.inc1
-rw-r--r--src/google/protobuf/repeated_field.h4
-rw-r--r--src/google/protobuf/repeated_field_unittest.cc2
-rw-r--r--src/google/protobuf/source_context.pb.cc24
-rw-r--r--src/google/protobuf/source_context.pb.h11
-rw-r--r--src/google/protobuf/struct.pb.cc62
-rw-r--r--src/google/protobuf/struct.pb.h20
-rw-r--r--src/google/protobuf/struct.proto4
-rw-r--r--src/google/protobuf/timestamp.pb.cc20
-rw-r--r--src/google/protobuf/timestamp.pb.h42
-rw-r--r--src/google/protobuf/type.pb.cc180
-rw-r--r--src/google/protobuf/type.pb.h128
-rw-r--r--src/google/protobuf/util/field_mask_util.h2
-rw-r--r--src/google/protobuf/wrappers.pb.cc158
-rw-r--r--src/google/protobuf/wrappers.pb.h120
101 files changed, 2939 insertions, 2189 deletions
diff --git a/cmake/libprotobuf-lite.cmake b/cmake/libprotobuf-lite.cmake
index b9caa8357..95b7f1fa7 100644
--- a/cmake/libprotobuf-lite.cmake
+++ b/cmake/libprotobuf-lite.cmake
@@ -5,6 +5,7 @@ set(libprotobuf_lite_files
${protobuf_source_dir}/src/google/protobuf/extension_set.cc
${protobuf_source_dir}/src/google/protobuf/generated_enum_util.cc
${protobuf_source_dir}/src/google/protobuf/generated_message_table_driven_lite.cc
+ ${protobuf_source_dir}/src/google/protobuf/generated_message_tctable_lite.cc
${protobuf_source_dir}/src/google/protobuf/generated_message_util.cc
${protobuf_source_dir}/src/google/protobuf/implicit_weak_message.cc
${protobuf_source_dir}/src/google/protobuf/inlined_string_field.cc
@@ -32,29 +33,54 @@ set(libprotobuf_lite_files
)
set(libprotobuf_lite_includes
+ ${protobuf_source_dir}/src/google/protobuf/any.h
${protobuf_source_dir}/src/google/protobuf/arena.h
+ ${protobuf_source_dir}/src/google/protobuf/arena_impl.h
${protobuf_source_dir}/src/google/protobuf/arenastring.h
${protobuf_source_dir}/src/google/protobuf/extension_set.h
+ ${protobuf_source_dir}/src/google/protobuf/extension_set_inl.h
+ ${protobuf_source_dir}/src/google/protobuf/generated_enum_util.h
+ ${protobuf_source_dir}/src/google/protobuf/generated_message_table_driven.h
+ ${protobuf_source_dir}/src/google/protobuf/generated_message_table_driven_lite.h
+ ${protobuf_source_dir}/src/google/protobuf/generated_message_tctable_decl.h
+ ${protobuf_source_dir}/src/google/protobuf/generated_message_tctable_impl.h
+ ${protobuf_source_dir}/src/google/protobuf/generated_message_tctable_impl.inc
${protobuf_source_dir}/src/google/protobuf/generated_message_util.h
+ ${protobuf_source_dir}/src/google/protobuf/has_bits.h
${protobuf_source_dir}/src/google/protobuf/implicit_weak_message.h
+ ${protobuf_source_dir}/src/google/protobuf/inlined_string_field.h
${protobuf_source_dir}/src/google/protobuf/io/coded_stream.h
+ ${protobuf_source_dir}/src/google/protobuf/io/io_win32.h
${protobuf_source_dir}/src/google/protobuf/io/strtod.h
${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream.h
${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl.h
${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl_lite.h
+ ${protobuf_source_dir}/src/google/protobuf/map.h
+ ${protobuf_source_dir}/src/google/protobuf/map_entry_lite.h
+ ${protobuf_source_dir}/src/google/protobuf/map_field_lite.h
+ ${protobuf_source_dir}/src/google/protobuf/map_type_handler.h
${protobuf_source_dir}/src/google/protobuf/message_lite.h
+ ${protobuf_source_dir}/src/google/protobuf/metadata_lite.h
${protobuf_source_dir}/src/google/protobuf/parse_context.h
+ ${protobuf_source_dir}/src/google/protobuf/port.h
${protobuf_source_dir}/src/google/protobuf/repeated_field.h
${protobuf_source_dir}/src/google/protobuf/stubs/bytestream.h
+ ${protobuf_source_dir}/src/google/protobuf/stubs/callback.h
+ ${protobuf_source_dir}/src/google/protobuf/stubs/casts.h
${protobuf_source_dir}/src/google/protobuf/stubs/common.h
- ${protobuf_source_dir}/src/google/protobuf/stubs/int128.h
+ ${protobuf_source_dir}/src/google/protobuf/stubs/hash.h
+ ${protobuf_source_dir}/src/google/protobuf/stubs/logging.h
+ ${protobuf_source_dir}/src/google/protobuf/stubs/macros.h
+ ${protobuf_source_dir}/src/google/protobuf/stubs/map_util.h
+ ${protobuf_source_dir}/src/google/protobuf/stubs/mutex.h
${protobuf_source_dir}/src/google/protobuf/stubs/once.h
+ ${protobuf_source_dir}/src/google/protobuf/stubs/platform_macros.h
+ ${protobuf_source_dir}/src/google/protobuf/stubs/port.h
${protobuf_source_dir}/src/google/protobuf/stubs/status.h
- ${protobuf_source_dir}/src/google/protobuf/stubs/statusor.h
+ ${protobuf_source_dir}/src/google/protobuf/stubs/stl_util.h
${protobuf_source_dir}/src/google/protobuf/stubs/stringpiece.h
- ${protobuf_source_dir}/src/google/protobuf/stubs/stringprintf.h
${protobuf_source_dir}/src/google/protobuf/stubs/strutil.h
- ${protobuf_source_dir}/src/google/protobuf/stubs/time.h
+ ${protobuf_source_dir}/src/google/protobuf/stubs/template_util.h
${protobuf_source_dir}/src/google/protobuf/wire_format_lite.h
)
diff --git a/cmake/libprotobuf.cmake b/cmake/libprotobuf.cmake
index d39446733..e4b810c66 100644
--- a/cmake/libprotobuf.cmake
+++ b/cmake/libprotobuf.cmake
@@ -15,11 +15,13 @@ set(libprotobuf_files
${protobuf_source_dir}/src/google/protobuf/generated_message_bases.cc
${protobuf_source_dir}/src/google/protobuf/generated_message_reflection.cc
${protobuf_source_dir}/src/google/protobuf/generated_message_table_driven.cc
+ ${protobuf_source_dir}/src/google/protobuf/generated_message_tctable_full.cc
${protobuf_source_dir}/src/google/protobuf/io/gzip_stream.cc
${protobuf_source_dir}/src/google/protobuf/io/printer.cc
${protobuf_source_dir}/src/google/protobuf/io/tokenizer.cc
${protobuf_source_dir}/src/google/protobuf/map_field.cc
${protobuf_source_dir}/src/google/protobuf/message.cc
+ ${protobuf_source_dir}/src/google/protobuf/reflection_internal.h
${protobuf_source_dir}/src/google/protobuf/reflection_ops.cc
${protobuf_source_dir}/src/google/protobuf/service.cc
${protobuf_source_dir}/src/google/protobuf/source_context.pb.cc
@@ -44,7 +46,6 @@ set(libprotobuf_files
${protobuf_source_dir}/src/google/protobuf/util/internal/protostream_objectsource.cc
${protobuf_source_dir}/src/google/protobuf/util/internal/protostream_objectwriter.cc
${protobuf_source_dir}/src/google/protobuf/util/internal/type_info.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/type_info_test_helper.cc
${protobuf_source_dir}/src/google/protobuf/util/internal/utility.cc
${protobuf_source_dir}/src/google/protobuf/util/json_util.cc
${protobuf_source_dir}/src/google/protobuf/util/message_differencer.cc
@@ -55,7 +56,6 @@ set(libprotobuf_files
)
set(libprotobuf_includes
- ${protobuf_source_dir}/src/google/protobuf/any.h
${protobuf_source_dir}/src/google/protobuf/any.pb.h
${protobuf_source_dir}/src/google/protobuf/api.pb.h
${protobuf_source_dir}/src/google/protobuf/compiler/importer.h
@@ -68,18 +68,22 @@ set(libprotobuf_includes
${protobuf_source_dir}/src/google/protobuf/empty.pb.h
${protobuf_source_dir}/src/google/protobuf/field_access_listener.h
${protobuf_source_dir}/src/google/protobuf/field_mask.pb.h
+ ${protobuf_source_dir}/src/google/protobuf/generated_enum_reflection.h
${protobuf_source_dir}/src/google/protobuf/generated_message_bases.h
${protobuf_source_dir}/src/google/protobuf/generated_message_reflection.h
${protobuf_source_dir}/src/google/protobuf/io/gzip_stream.h
${protobuf_source_dir}/src/google/protobuf/io/printer.h
${protobuf_source_dir}/src/google/protobuf/io/tokenizer.h
+ ${protobuf_source_dir}/src/google/protobuf/map_entry.h
${protobuf_source_dir}/src/google/protobuf/map_field.h
+ ${protobuf_source_dir}/src/google/protobuf/map_field_inl.h
${protobuf_source_dir}/src/google/protobuf/message.h
+ ${protobuf_source_dir}/src/google/protobuf/metadata.h
+ ${protobuf_source_dir}/src/google/protobuf/reflection.h
${protobuf_source_dir}/src/google/protobuf/reflection_ops.h
${protobuf_source_dir}/src/google/protobuf/service.h
${protobuf_source_dir}/src/google/protobuf/source_context.pb.h
${protobuf_source_dir}/src/google/protobuf/struct.pb.h
- ${protobuf_source_dir}/src/google/protobuf/stubs/substitute.h
${protobuf_source_dir}/src/google/protobuf/text_format.h
${protobuf_source_dir}/src/google/protobuf/timestamp.pb.h
${protobuf_source_dir}/src/google/protobuf/type.pb.h
@@ -87,23 +91,10 @@ set(libprotobuf_includes
${protobuf_source_dir}/src/google/protobuf/util/delimited_message_util.h
${protobuf_source_dir}/src/google/protobuf/util/field_comparator.h
${protobuf_source_dir}/src/google/protobuf/util/field_mask_util.h
- ${protobuf_source_dir}/src/google/protobuf/util/internal/datapiece.h
- ${protobuf_source_dir}/src/google/protobuf/util/internal/default_value_objectwriter.h
- ${protobuf_source_dir}/src/google/protobuf/util/internal/error_listener.h
- ${protobuf_source_dir}/src/google/protobuf/util/internal/field_mask_utility.h
- ${protobuf_source_dir}/src/google/protobuf/util/internal/json_escaping.h
- ${protobuf_source_dir}/src/google/protobuf/util/internal/json_objectwriter.h
- ${protobuf_source_dir}/src/google/protobuf/util/internal/json_stream_parser.h
- ${protobuf_source_dir}/src/google/protobuf/util/internal/object_writer.h
- ${protobuf_source_dir}/src/google/protobuf/util/internal/proto_writer.h
- ${protobuf_source_dir}/src/google/protobuf/util/internal/protostream_objectsource.h
- ${protobuf_source_dir}/src/google/protobuf/util/internal/protostream_objectwriter.h
- ${protobuf_source_dir}/src/google/protobuf/util/internal/type_info.h
- ${protobuf_source_dir}/src/google/protobuf/util/internal/type_info_test_helper.h
- ${protobuf_source_dir}/src/google/protobuf/util/internal/utility.h
${protobuf_source_dir}/src/google/protobuf/util/json_util.h
${protobuf_source_dir}/src/google/protobuf/util/message_differencer.h
${protobuf_source_dir}/src/google/protobuf/util/time_util.h
+ ${protobuf_source_dir}/src/google/protobuf/util/type_resolver.h
${protobuf_source_dir}/src/google/protobuf/util/type_resolver_util.h
${protobuf_source_dir}/src/google/protobuf/wire_format.h
${protobuf_source_dir}/src/google/protobuf/wrappers.pb.h
diff --git a/cmake/libprotoc.cmake b/cmake/libprotoc.cmake
index a6f791934..505e469d0 100644
--- a/cmake/libprotoc.cmake
+++ b/cmake/libprotoc.cmake
@@ -36,6 +36,7 @@ set(libprotoc_files
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_doc_comment.cc
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum.cc
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_field.cc
+ ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_field.h
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_field_lite.cc
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_lite.cc
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_extension.cc
@@ -64,17 +65,28 @@ set(libprotoc_files
${protobuf_source_dir}/src/google/protobuf/compiler/js/js_generator.cc
${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum.cc
+ ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum.h
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc
+ ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_extension.cc
+ ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_extension.h
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_field.cc
+ ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_field.h
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_file.cc
+ ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_file.h
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_generator.cc
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc
+ ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_map_field.h
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_message.cc
+ ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_message.h
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc
+ ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_message_field.h
+ ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_nsobject_methods.h
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc
+ ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_oneof.h
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc
+ ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.h
${protobuf_source_dir}/src/google/protobuf/compiler/php/php_generator.cc
${protobuf_source_dir}/src/google/protobuf/compiler/plugin.cc
${protobuf_source_dir}/src/google/protobuf/compiler/plugin.pb.cc
@@ -82,85 +94,30 @@ set(libprotoc_files
${protobuf_source_dir}/src/google/protobuf/compiler/ruby/ruby_generator.cc
${protobuf_source_dir}/src/google/protobuf/compiler/subprocess.cc
${protobuf_source_dir}/src/google/protobuf/compiler/zip_writer.cc
+ ${protobuf_source_dir}/src/google/protobuf/compiler/zip_writer.h
)
set(libprotoc_headers
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_enum.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_enum_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_extension.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_field.h
+ ${protobuf_source_dir}/src/google/protobuf/compiler/code_generator.h
+ ${protobuf_source_dir}/src/google/protobuf/compiler/command_line_interface.h
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_file.h
+ ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_generator.h
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_helpers.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_map_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_message.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_message_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_message_layout_helper.h
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_names.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_options.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_parse_function_generator.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_primitive_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_service.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_string_field.h
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_doc_comment.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_enum.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_enum_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_field_base.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_helpers.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_map_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_message.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_message_field.h
+ ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_generator.h
+ ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_names.h
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_options.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_primitive_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_reflection_class.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_source_generator_base.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_wrapper_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_context.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_doc_comment.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_field_lite.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_lite.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_extension.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_extension_lite.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_file.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_generator_factory.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_helpers.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_map_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_map_field_lite.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_builder.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_builder_lite.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_field_lite.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_lite.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_name_resolver.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_options.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_primitive_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_primitive_field_lite.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_service.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_shared_code_generator.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_string_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_string_field_lite.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_extension.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_file.h
+ ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_generator.h
+ ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_kotlin_generator.h
+ ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_names.h
+ ${protobuf_source_dir}/src/google/protobuf/compiler/js/js_generator.h
+ ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_generator.h
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_map_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_message.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_message_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_nsobject_methods.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_oneof.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/scc.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/subprocess.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/zip_writer.h
+ ${protobuf_source_dir}/src/google/protobuf/compiler/php/php_generator.h
+ ${protobuf_source_dir}/src/google/protobuf/compiler/plugin.h
+ ${protobuf_source_dir}/src/google/protobuf/compiler/python/python_generator.h
+ ${protobuf_source_dir}/src/google/protobuf/compiler/ruby/ruby_generator.h
)
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
@@ -183,4 +140,3 @@ set_target_properties(libprotoc PROPERTIES
OUTPUT_NAME ${LIB_PREFIX}protoc
DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}")
add_library(protobuf::libprotoc ALIAS libprotoc)
-
diff --git a/cmake/tests.cmake b/cmake/tests.cmake
index 801c994fd..9ede4f328 100644
--- a/cmake/tests.cmake
+++ b/cmake/tests.cmake
@@ -111,27 +111,28 @@ foreach(proto_file ${tests_protos})
${protobuf_source_dir}/src/${pb_file})
endforeach(proto_file)
-set(common_test_files
+set(common_lite_test_files
${protobuf_source_dir}/src/google/protobuf/arena_test_util.cc
+ ${protobuf_source_dir}/src/google/protobuf/map_lite_test_util.cc
+ ${protobuf_source_dir}/src/google/protobuf/test_util_lite.cc
+)
+
+set(common_test_files
+ ${common_lite_test_files}
+ ${protobuf_source_dir}/src/google/protobuf/compiler/mock_code_generator.cc
${protobuf_source_dir}/src/google/protobuf/map_test_util.inc
${protobuf_source_dir}/src/google/protobuf/reflection_tester.cc
${protobuf_source_dir}/src/google/protobuf/test_util.cc
- ${protobuf_source_dir}/src/google/protobuf/test_util.inc
${protobuf_source_dir}/src/google/protobuf/testing/file.cc
${protobuf_source_dir}/src/google/protobuf/testing/googletest.cc
)
-set(common_lite_test_files
- ${protobuf_source_dir}/src/google/protobuf/arena_test_util.cc
- ${protobuf_source_dir}/src/google/protobuf/map_lite_test_util.cc
- ${protobuf_source_dir}/src/google/protobuf/test_util_lite.cc
-)
-
set(tests_files
${protobuf_source_dir}/src/google/protobuf/any_test.cc
${protobuf_source_dir}/src/google/protobuf/arena_unittest.cc
${protobuf_source_dir}/src/google/protobuf/arenastring_unittest.cc
${protobuf_source_dir}/src/google/protobuf/compiler/annotation_test_util.cc
+ ${protobuf_source_dir}/src/google/protobuf/compiler/annotation_test_util.h
${protobuf_source_dir}/src/google/protobuf/compiler/command_line_interface_unittest.cc
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_move_unittest.cc
@@ -144,7 +145,6 @@ set(tests_files
${protobuf_source_dir}/src/google/protobuf/compiler/importer_unittest.cc
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_doc_comment_unittest.cc
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_plugin_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/mock_code_generator.cc
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_helpers_unittest.cc
${protobuf_source_dir}/src/google/protobuf/compiler/parser_unittest.cc
${protobuf_source_dir}/src/google/protobuf/compiler/python/python_plugin_unittest.cc
diff --git a/conformance/conformance.proto b/conformance/conformance.proto
index 49608b38f..7248e9896 100644
--- a/conformance/conformance.proto
+++ b/conformance/conformance.proto
@@ -95,7 +95,7 @@ message ConformanceRequest {
//
// TODO(haberman): if/when we expand the conformance tests to support proto2,
// we will want to include a field that lets the payload/response be a
- // protobuf_test_messages.proto2.TestAllTypes message instead.
+ // protobuf_test_messages.google.protobuf.TestAllTypes message instead.
oneof payload {
bytes protobuf_payload = 1;
string json_payload = 2;
@@ -109,7 +109,7 @@ message ConformanceRequest {
// The full name for the test message to use; for the moment, either:
// protobuf_test_messages.proto3.TestAllTypesProto3 or
- // protobuf_test_messages.proto2.TestAllTypesProto2.
+ // protobuf_test_messages.google.protobuf.TestAllTypesProto2.
string message_type = 4;
// Each test is given a specific test category. Some category may need
diff --git a/conformance/conformance_nodejs.js b/conformance/conformance_nodejs.js
index 4d96a3851..f6bbcf4fc 100755..100644
--- a/conformance/conformance_nodejs.js
+++ b/conformance/conformance_nodejs.js
@@ -1,3 +1,33 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
#!/usr/bin/env node
/*
diff --git a/conformance/text_format_failure_list_java.txt b/conformance/text_format_failure_list_java.txt
index 71e32429e..793aae128 100644
--- a/conformance/text_format_failure_list_java.txt
+++ b/conformance/text_format_failure_list_java.txt
@@ -7,7 +7,3 @@ Required.Proto3.TextFormatInput.AnyField.TextFormatOutput
Required.Proto3.TextFormatInput.StringFieldBadUTF8Hex
Required.Proto3.TextFormatInput.StringFieldBadUTF8Octal
-Required.Proto3.TextFormatInput.StringLiteralBasicEscapesBytes.ProtobufOutput
-Required.Proto3.TextFormatInput.StringLiteralBasicEscapesBytes.TextFormatOutput
-Required.Proto3.TextFormatInput.StringLiteralBasicEscapesString.ProtobufOutput
-Required.Proto3.TextFormatInput.StringLiteralBasicEscapesString.TextFormatOutput
diff --git a/csharp/src/Google.Protobuf.Conformance/Conformance.cs b/csharp/src/Google.Protobuf.Conformance/Conformance.cs
index fb053b257..0a3d5c604 100644
--- a/csharp/src/Google.Protobuf.Conformance/Conformance.cs
+++ b/csharp/src/Google.Protobuf.Conformance/Conformance.cs
@@ -427,7 +427,7 @@ namespace Conformance {
/// <summary>
/// The full name for the test message to use; for the moment, either:
/// protobuf_test_messages.proto3.TestAllTypesProto3 or
- /// protobuf_test_messages.proto2.TestAllTypesProto2.
+ /// protobuf_test_messages.google.protobuf.TestAllTypesProto2.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
diff --git a/csharp/src/Google.Protobuf.Test/testprotos.pb b/csharp/src/Google.Protobuf.Test/testprotos.pb
index caf51644e..da79db8ec 100644
--- a/csharp/src/Google.Protobuf.Test/testprotos.pb
+++ b/csharp/src/Google.Protobuf.Test/testprotos.pb
Binary files differ
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs
index b32b76c0a..123d80ac9 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs
@@ -261,8 +261,8 @@ namespace Google.Protobuf.WellKnownTypes {
/// <summary>
/// `Value` represents a dynamically typed value which can be either
/// null, a number, a string, a boolean, a recursive struct value, or a
- /// list of values. A producer of value is expected to set one of that
- /// variants, absence of any variant indicates an error.
+ /// list of values. A producer of value is expected to set one of these
+ /// variants. Absence of any variant indicates an error.
///
/// The JSON representation for `Value` is JSON value.
/// </summary>
diff --git a/java/core/src/main/java/com/google/protobuf/ByteString.java b/java/core/src/main/java/com/google/protobuf/ByteString.java
index 9617f770c..e698f681d 100644
--- a/java/core/src/main/java/com/google/protobuf/ByteString.java
+++ b/java/core/src/main/java/com/google/protobuf/ByteString.java
@@ -480,7 +480,8 @@ public abstract class ByteString implements Iterable<Byte>, Serializable {
* @param streamToDrain The source stream, which is read completely but not closed.
* @return A new {@code ByteString} which is made up of chunks of various sizes, depending on the
* behavior of the underlying stream.
- * @throws IOException IOException is thrown if there is a problem reading the underlying stream.
+ * @throws IOException if there is a problem reading the underlying stream
+ * @throws IllegalArgumentException if the stream supplies more than Integer.MAX_VALUE bytes
*/
public static ByteString readFrom(InputStream streamToDrain) throws IOException {
return readFrom(streamToDrain, MIN_READ_FROM_CHUNK_SIZE, MAX_READ_FROM_CHUNK_SIZE);
@@ -500,13 +501,23 @@ public abstract class ByteString implements Iterable<Byte>, Serializable {
* @param streamToDrain The source stream, which is read completely but not closed.
* @param chunkSize The size of the chunks in which to read the stream.
* @return A new {@code ByteString} which is made up of chunks of the given size.
- * @throws IOException IOException is thrown if there is a problem reading the underlying stream.
+ * @throws IOException if there is a problem reading the underlying stream
+ * @throws IllegalArgumentException if the stream supplies more than Integer.MAX_VALUE bytes
*/
public static ByteString readFrom(InputStream streamToDrain, int chunkSize) throws IOException {
return readFrom(streamToDrain, chunkSize, chunkSize);
}
- // Helper method that takes the chunk size range as a parameter.
+ /**
+ * Helper method that takes the chunk size range as a parameter.
+ *
+ * @param streamToDrain the source stream, which is read completely but not closed
+ * @param minChunkSize the minimum size of the chunks in which to read the stream
+ * @param maxChunkSize the maximum size of the chunks in which to read the stream
+ * @return a new {@code ByteString} which is made up of chunks within the given size range
+ * @throws IOException if there is a problem reading the underlying stream
+ * @throws IllegalArgumentException if the stream supplies more than Integer.MAX_VALUE bytes
+ */
public static ByteString readFrom(InputStream streamToDrain, int minChunkSize, int maxChunkSize)
throws IOException {
Collection<ByteString> results = new ArrayList<ByteString>();
@@ -565,6 +576,8 @@ public abstract class ByteString implements Iterable<Byte>, Serializable {
*
* @param other string to concatenate
* @return a new {@code ByteString} instance
+ * @throws IllegalArgumentException if the combined size of the two byte strings exceeds
+ * Integer.MAX_VALUE
*/
public final ByteString concat(ByteString other) {
if (Integer.MAX_VALUE - size() < other.size()) {
@@ -585,6 +598,8 @@ public abstract class ByteString implements Iterable<Byte>, Serializable {
*
* @param byteStrings strings to be concatenated
* @return new {@code ByteString}
+ * @throws IllegalArgumentException if the combined size of the byte strings exceeds
+ * Integer.MAX_VALUE
*/
public static ByteString copyFrom(Iterable<ByteString> byteStrings) {
// Determine the size;
diff --git a/java/core/src/main/java/com/google/protobuf/CodedInputStream.java b/java/core/src/main/java/com/google/protobuf/CodedInputStream.java
index 168eb5ac0..cd639686c 100644
--- a/java/core/src/main/java/com/google/protobuf/CodedInputStream.java
+++ b/java/core/src/main/java/com/google/protobuf/CodedInputStream.java
@@ -2013,20 +2013,20 @@ public abstract class CodedInputStream {
private ByteBuffer slice(long begin, long end) throws IOException {
int prevPos = buffer.position();
int prevLimit = buffer.limit();
+ // View ByteBuffer as Buffer to avoid cross-Java version issues.
+ // See https://issues.apache.org/jira/browse/MRESOLVER-85
+ Buffer asBuffer = buffer;
try {
- // Casts to Buffer here are required for Java 8 compatibility
- // no matter what tricorder tells you. see
- // https://issues.apache.org/jira/browse/MRESOLVER-85
- ((Buffer) buffer).position(bufferPos(begin));
- ((Buffer) buffer).limit(bufferPos(end));
+ asBuffer.position(bufferPos(begin));
+ asBuffer.limit(bufferPos(end));
return buffer.slice();
} catch (IllegalArgumentException e) {
InvalidProtocolBufferException ex = InvalidProtocolBufferException.truncatedMessage();
ex.initCause(e);
throw ex;
} finally {
- ((Buffer) buffer).position(prevPos);
- ((Buffer) buffer).limit(prevLimit);
+ asBuffer.position(prevPos);
+ asBuffer.limit(prevLimit);
}
}
}
@@ -3963,18 +3963,18 @@ public abstract class CodedInputStream {
private ByteBuffer slice(int begin, int end) throws IOException {
int prevPos = currentByteBuffer.position();
int prevLimit = currentByteBuffer.limit();
+ // View ByteBuffer as Buffer to avoid cross-Java version issues.
+ // See https://issues.apache.org/jira/browse/MRESOLVER-85
+ Buffer asBuffer = currentByteBuffer;
try {
- // casts to Buffer here are required for Java 8 compatibility
- // no matter what tricorder tells you. see
- // https://issues.apache.org/jira/browse/MRESOLVER-85
- ((Buffer) currentByteBuffer).position(begin);
- ((Buffer) currentByteBuffer).limit(end);
+ asBuffer.position(begin);
+ asBuffer.limit(end);
return currentByteBuffer.slice();
} catch (IllegalArgumentException e) {
throw InvalidProtocolBufferException.truncatedMessage();
} finally {
- ((Buffer) currentByteBuffer).position(prevPos);
- ((Buffer) currentByteBuffer).limit(prevLimit);
+ asBuffer.position(prevPos);
+ asBuffer.limit(prevLimit);
}
}
}
diff --git a/java/core/src/main/java/com/google/protobuf/CodedOutputStream.java b/java/core/src/main/java/com/google/protobuf/CodedOutputStream.java
index 399a6eb92..e79543ac5 100644
--- a/java/core/src/main/java/com/google/protobuf/CodedOutputStream.java
+++ b/java/core/src/main/java/com/google/protobuf/CodedOutputStream.java
@@ -693,7 +693,7 @@ public abstract class CodedOutputStream extends ByteOutput {
}
/**
- * Compute the number of bytes that would be needed to encode an lazily parsed MessageSet
+ * Compute the number of bytes that would be needed to encode a lazily parsed MessageSet
* extension field to the stream. For historical reasons, the wire format differs from normal
* fields.
*/
diff --git a/java/core/src/main/java/com/google/protobuf/GeneratedMessageV3.java b/java/core/src/main/java/com/google/protobuf/GeneratedMessageV3.java
index cba889ff2..184838b80 100644
--- a/java/core/src/main/java/com/google/protobuf/GeneratedMessageV3.java
+++ b/java/core/src/main/java/com/google/protobuf/GeneratedMessageV3.java
@@ -41,14 +41,14 @@ import com.google.protobuf.Internal.DoubleList;
import com.google.protobuf.Internal.FloatList;
import com.google.protobuf.Internal.IntList;
import com.google.protobuf.Internal.LongList;
-// In opensource protobuf, we have versioned this GeneratedMessageV3 class to GeneratedMessageV3V3 and
-// in the future may have GeneratedMessageV3V4 etc. This allows us to change some aspects of this
+// In opensource protobuf, we have versioned this GeneratedMessageV3 class to GeneratedMessageV3 and
+// in the future may have GeneratedMessageV4 etc. This allows us to change some aspects of this
// class without breaking binary compatibility with old generated code that still subclasses
-// the old GeneratedMessageV3 class. To allow these different GeneratedMessageV3V? classes to
-// interoperate (e.g., a GeneratedMessageV3V3 object has a message extension field whose class
-// type is GeneratedMessageV3V4), these classes still share a common parent class AbstractMessage
+// the old GeneratedMessageV3 class. To allow these different GeneratedMessageV? classes to
+// interoperate (e.g., a GeneratedMessageV3 object has a message extension field whose class
+// type is GeneratedMessageV4), these classes still share a common parent class AbstractMessage
// and are using the same GeneratedMessage.GeneratedExtension class for extension definitions.
-// Since this class becomes GeneratedMessageV3V? in opensource, we have to add an import here
+// Since this class becomes GeneratedMessageV? in opensource, we have to add an import here
// to be able to use GeneratedMessage.GeneratedExtension. The GeneratedExtension definition in
// this file is also excluded from opensource to avoid conflict.
import com.google.protobuf.GeneratedMessage.GeneratedExtension;
diff --git a/java/core/src/main/java/com/google/protobuf/MapFieldLite.java b/java/core/src/main/java/com/google/protobuf/MapFieldLite.java
index 66ff59210..66f5f4656 100644
--- a/java/core/src/main/java/com/google/protobuf/MapFieldLite.java
+++ b/java/core/src/main/java/com/google/protobuf/MapFieldLite.java
@@ -63,7 +63,7 @@ public final class MapFieldLite<K, V> extends LinkedHashMap<K, V> {
EMPTY_MAP_FIELD.makeImmutable();
}
- /** Returns an singleton immutable empty MapFieldLite instance. */
+ /** Returns a singleton immutable empty MapFieldLite instance. */
@SuppressWarnings({"unchecked", "cast"})
public static <K, V> MapFieldLite<K, V> emptyMapField() {
return (MapFieldLite<K, V>) EMPTY_MAP_FIELD;
diff --git a/java/core/src/main/java/com/google/protobuf/MessageLite.java b/java/core/src/main/java/com/google/protobuf/MessageLite.java
index 7d2ef33a1..bbf30364b 100644
--- a/java/core/src/main/java/com/google/protobuf/MessageLite.java
+++ b/java/core/src/main/java/com/google/protobuf/MessageLite.java
@@ -73,6 +73,9 @@ public interface MessageLite extends MessageLiteOrBuilder {
/**
* Get the number of bytes required to encode this message. The result is only computed on the
* first call and memoized after that.
+ *
+ * If this message requires more than Integer.MAX_VALUE bytes to encode, the return value will
+ * be smaller than the actual number of bytes required and might be negative.
*/
int getSerializedSize();
@@ -85,12 +88,18 @@ public interface MessageLite extends MessageLiteOrBuilder {
/**
* Serializes the message to a {@code ByteString} and returns it. This is just a trivial wrapper
* around {@link #writeTo(CodedOutputStream)}.
+ *
+ * If this message requires more than Integer.MAX_VALUE bytes to encode, the behavior is
+ * unpredictable. It may throw a runtime exception or truncate or slice the data.
*/
ByteString toByteString();
/**
* Serializes the message to a {@code byte} array and returns it. This is just a trivial wrapper
* around {@link #writeTo(CodedOutputStream)}.
+ *
+ * If this message requires more than Integer.MAX_VALUE bytes to encode, the behavior is
+ * unpredictable. It may throw a runtime exception or truncate or slice the data.
*/
byte[] toByteArray();
diff --git a/java/core/src/main/java/com/google/protobuf/SchemaUtil.java b/java/core/src/main/java/com/google/protobuf/SchemaUtil.java
index 4c8bb06f0..a798599c8 100644
--- a/java/core/src/main/java/com/google/protobuf/SchemaUtil.java
+++ b/java/core/src/main/java/com/google/protobuf/SchemaUtil.java
@@ -63,7 +63,7 @@ final class SchemaUtil {
&& GENERATED_MESSAGE_CLASS != null
&& !GENERATED_MESSAGE_CLASS.isAssignableFrom(messageType)) {
throw new IllegalArgumentException(
- "Message classes must extend GeneratedMessage or GeneratedMessageLite");
+ "Message classes must extend GeneratedMessageV3 or GeneratedMessageLite");
}
}
diff --git a/java/core/src/main/java/com/google/protobuf/TextFormat.java b/java/core/src/main/java/com/google/protobuf/TextFormat.java
index e781df333..b0a057be1 100644
--- a/java/core/src/main/java/com/google/protobuf/TextFormat.java
+++ b/java/core/src/main/java/com/google/protobuf/TextFormat.java
@@ -445,9 +445,12 @@ public final class TextFormat {
}
/**
- * An adapter class that can take a MapEntry or a MutableMapEntry and returns its key and entry.
- * This class is created solely for the purpose of sorting map entries by its key and prevent
- * duplicated logic by having a separate comparator for MapEntry and MutableMapEntry.
+ * An adapter class that can take a {@link MapEntry} and returns its key and entry.
+ * BEGIN GOOGLE-INTERNAL
+ * This class is created solely for the purpose of sorting map entries by its
+ * key and prevent duplicated logic by having a separate comparator for {@link MapEntry} and
+ * {@link MutableMapEntry}.
+ * END GOOGLE-INTERNAL
*/
private static class MapEntryAdapter implements Comparable<MapEntryAdapter> {
private Object entry;
@@ -2360,6 +2363,9 @@ public final class TextFormat {
case '"':
result[pos++] = '\"';
break;
+ case '?':
+ result[pos++] = '?';
+ break;
case 'x':
// hex escape
diff --git a/java/core/src/test/java/com/google/protobuf/RepeatedFieldBuilderV3Test.java b/java/core/src/test/java/com/google/protobuf/RepeatedFieldBuilderV3Test.java
index 18d90fe9d..bb95e2a21 100644
--- a/java/core/src/test/java/com/google/protobuf/RepeatedFieldBuilderV3Test.java
+++ b/java/core/src/test/java/com/google/protobuf/RepeatedFieldBuilderV3Test.java
@@ -184,7 +184,7 @@ public class RepeatedFieldBuilderV3Test {
}
private RepeatedFieldBuilderV3<TestAllTypes, TestAllTypes.Builder, TestAllTypesOrBuilder>
- newRepeatedFieldBuilderV3(GeneratedMessage.BuilderParent parent) {
+ newRepeatedFieldBuilderV3(AbstractMessage.BuilderParent parent) {
return new RepeatedFieldBuilderV3<TestAllTypes, TestAllTypes.Builder, TestAllTypesOrBuilder>(
Collections.<TestAllTypes>emptyList(), false, parent, false);
}
diff --git a/java/core/src/test/java/com/google/protobuf/TestUtil.java b/java/core/src/test/java/com/google/protobuf/TestUtil.java
index 27d7e692f..b4092687d 100644
--- a/java/core/src/test/java/com/google/protobuf/TestUtil.java
+++ b/java/core/src/test/java/com/google/protobuf/TestUtil.java
@@ -3815,8 +3815,7 @@ public final class TestUtil {
private static ByteString readBytesFromResource(String name) {
try {
- return ByteString.copyFrom(
- com.google.common.io.ByteStreams.toByteArray(TestUtil.class.getResourceAsStream(name)));
+ return ByteString.readFrom(TestUtil.class.getResourceAsStream(name));
} catch (IOException e) {
throw new RuntimeException(e);
}
diff --git a/java/core/src/test/java/com/google/protobuf/TextFormatTest.java b/java/core/src/test/java/com/google/protobuf/TextFormatTest.java
index 69568e1df..e755111f0 100644
--- a/java/core/src/test/java/com/google/protobuf/TextFormatTest.java
+++ b/java/core/src/test/java/com/google/protobuf/TextFormatTest.java
@@ -34,6 +34,7 @@ import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.Truth.assertWithMessage;
import static com.google.protobuf.TestUtil.TEST_REQUIRED_INITIALIZED;
import static com.google.protobuf.TestUtil.TEST_REQUIRED_UNINITIALIZED;
+import static org.junit.Assert.assertThrows;
import com.google.protobuf.DescriptorProtos.DescriptorProto;
import com.google.protobuf.DescriptorProtos.FieldDescriptorProto;
@@ -41,6 +42,7 @@ import com.google.protobuf.DescriptorProtos.FileDescriptorProto;
import com.google.protobuf.Descriptors.Descriptor;
import com.google.protobuf.Descriptors.FieldDescriptor;
import com.google.protobuf.Descriptors.FileDescriptor;
+import com.google.protobuf.TextFormat.InvalidEscapeSequenceException;
import com.google.protobuf.TextFormat.Parser.SingularOverwritePolicy;
import com.google.protobuf.testing.proto.TestProto3Optional;
import com.google.protobuf.testing.proto.TestProto3Optional.NestedEnum;
@@ -61,6 +63,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.logging.Logger;
import org.junit.Test;
+import org.junit.function.ThrowingRunnable;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@@ -596,9 +599,7 @@ public class TextFormatTest {
.setPackage("google.protobuf")
.setSyntax("proto3")
.addMessageType(
- DescriptorProto.newBuilder()
- .setName("Any")
- .addAllField(Arrays.asList(fields)))
+ DescriptorProto.newBuilder().setName("Any").addAllField(Arrays.asList(fields)))
.build(),
new FileDescriptor[0]);
return fileDescriptor.getMessageTypes().get(0);
@@ -874,6 +875,11 @@ public class TextFormatTest {
}
// =================================================================
+ @Test
+ public void testEscapeQuestionMark() throws InvalidEscapeSequenceException {
+ assertThat(TextFormat.unescapeText("?")).isEqualTo("?");
+ assertThat(TextFormat.unescapeText("\\?")).isEqualTo("?");
+ }
@Test
public void testEscape() throws Exception {
@@ -1232,6 +1238,36 @@ public class TextFormatTest {
}
@Test
+ public void testPrintFieldValueThrows() throws Exception {
+ assertPrintFieldThrowsClassCastException(5, "repeated_string");
+ assertPrintFieldThrowsClassCastException(5L, "repeated_string");
+ assertPrintFieldThrowsClassCastException(ByteString.EMPTY, "repeated_string");
+ assertPrintFieldThrowsClassCastException(5, "repeated_float");
+ assertPrintFieldThrowsClassCastException(5D, "repeated_float");
+ assertPrintFieldThrowsClassCastException("text", "repeated_float");
+ assertPrintFieldThrowsClassCastException(5, "repeated_double");
+ assertPrintFieldThrowsClassCastException(5F, "repeated_double");
+ assertPrintFieldThrowsClassCastException("text", "repeated_double");
+ assertPrintFieldThrowsClassCastException(123L, "repeated_int32");
+ assertPrintFieldThrowsClassCastException(123, "repeated_int64");
+ assertPrintFieldThrowsClassCastException(1, "repeated_bytes");
+ }
+
+ private void assertPrintFieldThrowsClassCastException(final Object value, String fieldName)
+ throws Exception {
+ final StringBuilder stringBuilder = new StringBuilder();
+ final FieldDescriptor fieldDescriptor = TestAllTypes.getDescriptor().findFieldByName(fieldName);
+ assertThrows(
+ ClassCastException.class,
+ new ThrowingRunnable() {
+ @Override
+ public void run() throws Throwable {
+ TextFormat.printer().printFieldValue(fieldDescriptor, value, stringBuilder);
+ }
+ });
+ }
+
+ @Test
public void testShortDebugString() {
assertThat(
TextFormat.shortDebugString(
diff --git a/java/core/src/test/proto/com/google/protobuf/map_lite_test.proto b/java/core/src/test/proto/com/google/protobuf/map_lite_test.proto
index 7324653f8..35ab9a179 100644
--- a/java/core/src/test/proto/com/google/protobuf/map_lite_test.proto
+++ b/java/core/src/test/proto/com/google/protobuf/map_lite_test.proto
@@ -30,7 +30,7 @@
syntax = "proto3";
-package map_lite_test;
+package map_test;
option optimize_for = LITE_RUNTIME;
option java_package = "map_lite_test";
diff --git a/objectivec/GPBStruct.pbobjc.h b/objectivec/GPBStruct.pbobjc.h
index e36df3f1a..abdd6c82b 100644
--- a/objectivec/GPBStruct.pbobjc.h
+++ b/objectivec/GPBStruct.pbobjc.h
@@ -128,8 +128,8 @@ typedef GPB_ENUM(GPBValue_Kind_OneOfCase) {
/**
* `Value` represents a dynamically typed value which can be either
* null, a number, a string, a boolean, a recursive struct value, or a
- * list of values. A producer of value is expected to set one of that
- * variants, absence of any variant indicates an error.
+ * list of values. A producer of value is expected to set one of these
+ * variants. Absence of any variant indicates an error.
*
* The JSON representation for `Value` is JSON value.
**/
diff --git a/php/src/Google/Protobuf/Value.php b/php/src/Google/Protobuf/Value.php
index 7bebb9988..dcc0bdf7c 100644
--- a/php/src/Google/Protobuf/Value.php
+++ b/php/src/Google/Protobuf/Value.php
@@ -11,8 +11,8 @@ use Google\Protobuf\Internal\GPBUtil;
/**
* `Value` represents a dynamically typed value which can be either
* null, a number, a string, a boolean, a recursive struct value, or a
- * list of values. A producer of value is expected to set one of that
- * variants, absence of any variant indicates an error.
+ * list of values. A producer of value is expected to set one of these
+ * variants. Absence of any variant indicates an error.
* The JSON representation for `Value` is JSON value.
*
* Generated from protobuf message <code>google.protobuf.Value</code>
diff --git a/python/google/protobuf/descriptor.py b/python/google/protobuf/descriptor.py
index 70fdae16f..0f7bd1744 100644
--- a/python/google/protobuf/descriptor.py
+++ b/python/google/protobuf/descriptor.py
@@ -36,7 +36,6 @@ __author__ = 'robinson@google.com (Will Robinson)'
import threading
import warnings
-import six
from google.protobuf.internal import api_implementation
@@ -111,7 +110,7 @@ _Deprecated.count = 100
_internal_create_key = object()
-class DescriptorBase(six.with_metaclass(DescriptorMetaclass)):
+class DescriptorBase(metaclass=DescriptorMetaclass):
"""Descriptors base class.
diff --git a/python/google/protobuf/descriptor_pool.py b/python/google/protobuf/descriptor_pool.py
index de9100b09..a6955ce81 100644
--- a/python/google/protobuf/descriptor_pool.py
+++ b/python/google/protobuf/descriptor_pool.py
@@ -207,13 +207,18 @@ class DescriptorPool(object):
Args:
serialized_file_desc_proto (bytes): A bytes string, serialization of the
:class:`FileDescriptorProto` to add.
+
+ Returns:
+ FileDescriptor: Descriptor for the added file.
"""
# pylint: disable=g-import-not-at-top
from google.protobuf import descriptor_pb2
file_desc_proto = descriptor_pb2.FileDescriptorProto.FromString(
serialized_file_desc_proto)
- self.Add(file_desc_proto)
+ file_desc = self._ConvertFileProtoToFileDescriptor(file_desc_proto)
+ file_desc.serialized_pb = serialized_file_desc_proto
+ return file_desc
# Add Descriptor to descriptor pool is dreprecated. Please use Add()
# or AddSerializedFile() to add a FileDescriptorProto instead.
@@ -808,7 +813,6 @@ class DescriptorPool(object):
self._MakeServiceDescriptor(service_proto, index, scope,
file_proto.package, file_descriptor))
- self.Add(file_proto)
self._file_descriptors[file_proto.name] = file_descriptor
# Add extensions to the pool
@@ -865,11 +869,17 @@ class DescriptorPool(object):
for index, extension in enumerate(desc_proto.extension)]
oneofs = [
# pylint: disable=g-complex-comprehension
- descriptor.OneofDescriptor(desc.name, '.'.join((desc_name, desc.name)),
- index, None, [], desc.options,
- # pylint: disable=protected-access
- create_key=descriptor._internal_create_key)
- for index, desc in enumerate(desc_proto.oneof_decl)]
+ descriptor.OneofDescriptor(
+ desc.name,
+ '.'.join((desc_name, desc.name)),
+ index,
+ None,
+ [],
+ _OptionsOrNone(desc),
+ # pylint: disable=protected-access
+ create_key=descriptor._internal_create_key)
+ for index, desc in enumerate(desc_proto.oneof_decl)
+ ]
extension_ranges = [(r.start, r.end) for r in desc_proto.extension_range]
if extension_ranges:
is_extendable = True
@@ -987,6 +997,11 @@ class DescriptorPool(object):
else:
full_name = field_proto.name
+ if field_proto.json_name:
+ json_name = field_proto.json_name
+ else:
+ json_name = None
+
return descriptor.FieldDescriptor(
name=field_proto.name,
full_name=full_name,
@@ -1003,6 +1018,7 @@ class DescriptorPool(object):
is_extension=is_extension,
extension_scope=None,
options=_OptionsOrNone(field_proto),
+ json_name=json_name,
file=file_desc,
# pylint: disable=protected-access
create_key=descriptor._internal_create_key)
@@ -1107,6 +1123,8 @@ class DescriptorPool(object):
field_desc.default_value = b''
elif field_proto.type == descriptor.FieldDescriptor.TYPE_MESSAGE:
field_desc.default_value = None
+ elif field_proto.type == descriptor.FieldDescriptor.TYPE_GROUP:
+ field_desc.default_value = None
else:
# All other types are of the "int" type.
field_desc.default_value = 0
diff --git a/python/google/protobuf/internal/__init__.py b/python/google/protobuf/internal/__init__.py
index 7d2e571a1..e69de29bb 100644
--- a/python/google/protobuf/internal/__init__.py
+++ b/python/google/protobuf/internal/__init__.py
@@ -1,30 +0,0 @@
-# Protocol Buffers - Google's data interchange format
-# Copyright 2008 Google Inc. All rights reserved.
-# https://developers.google.com/protocol-buffers/
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
diff --git a/python/google/protobuf/internal/decoder.py b/python/google/protobuf/internal/decoder.py
index 6804986b6..bc1b7b785 100644
--- a/python/google/protobuf/internal/decoder.py
+++ b/python/google/protobuf/internal/decoder.py
@@ -80,16 +80,8 @@ we repeatedly read a tag, look up the corresponding decoder, and invoke it.
__author__ = 'kenton@google.com (Kenton Varda)'
+import math
import struct
-import sys
-import six
-
-_UCS2_MAXUNICODE = 65535
-if six.PY3:
- long = int
-else:
- import re # pylint: disable=g-import-not-at-top
- _SURROGATE_PATTERN = re.compile(six.u(r'[\ud800-\udfff]'))
from google.protobuf.internal import containers
from google.protobuf.internal import encoder
@@ -97,13 +89,6 @@ from google.protobuf.internal import wire_format
from google.protobuf import message
-# This will overflow and thus become IEEE-754 "infinity". We would use
-# "float('inf')" but it doesn't work on Windows pre-Python-2.6.
-_POS_INF = 1e10000
-_NEG_INF = -_POS_INF
-_NAN = _POS_INF * 0
-
-
# This is not for optimization, but rather to avoid conflicts with local
# variables named "message".
_DecodeError = message.DecodeError
@@ -123,7 +108,7 @@ def _VarintDecoder(mask, result_type):
result = 0
shift = 0
while 1:
- b = six.indexbytes(buffer, pos)
+ b = buffer[pos]
result |= ((b & 0x7f) << shift)
pos += 1
if not (b & 0x80):
@@ -146,7 +131,7 @@ def _SignedVarintDecoder(bits, result_type):
result = 0
shift = 0
while 1:
- b = six.indexbytes(buffer, pos)
+ b = buffer[pos]
result |= ((b & 0x7f) << shift)
pos += 1
if not (b & 0x80):
@@ -159,12 +144,9 @@ def _SignedVarintDecoder(bits, result_type):
raise _DecodeError('Too many bytes when decoding varint.')
return DecodeVarint
-# We force 32-bit values to int and 64-bit values to long to make
-# alternate implementations where the distinction is more significant
-# (e.g. the C++ implementation) simpler.
-
-_DecodeVarint = _VarintDecoder((1 << 64) - 1, long)
-_DecodeSignedVarint = _SignedVarintDecoder(64, long)
+# All 32-bit and 64-bit values are represented as int.
+_DecodeVarint = _VarintDecoder((1 << 64) - 1, int)
+_DecodeSignedVarint = _SignedVarintDecoder(64, int)
# Use these versions for values which must be limited to 32 bits.
_DecodeVarint32 = _VarintDecoder((1 << 32) - 1, int)
@@ -189,7 +171,7 @@ def ReadTag(buffer, pos):
Tuple[bytes, int] of the tag data and new position.
"""
start = pos
- while six.indexbytes(buffer, pos) & 0x80:
+ while buffer[pos] & 0x80:
pos += 1
pos += 1
@@ -333,11 +315,11 @@ def _FloatDecoder():
if (float_bytes[3:4] in b'\x7F\xFF' and float_bytes[2:3] >= b'\x80'):
# If at least one significand bit is set...
if float_bytes[0:3] != b'\x00\x00\x80':
- return (_NAN, new_pos)
+ return (math.nan, new_pos)
# If sign bit is set...
if float_bytes[3:4] == b'\xFF':
- return (_NEG_INF, new_pos)
- return (_POS_INF, new_pos)
+ return (-math.inf, new_pos)
+ return (math.inf, new_pos)
# Note that we expect someone up-stack to catch struct.error and convert
# it to _DecodeError -- this way we don't have to set up exception-
@@ -377,7 +359,7 @@ def _DoubleDecoder():
if ((double_bytes[7:8] in b'\x7F\xFF')
and (double_bytes[6:7] >= b'\xF0')
and (double_bytes[0:7] != b'\x00\x00\x00\x00\x00\x00\xF0')):
- return (_NAN, new_pos)
+ return (math.nan, new_pos)
# Note that we expect someone up-stack to catch struct.error and convert
# it to _DecodeError -- this way we don't have to set up exception-
@@ -559,31 +541,21 @@ BoolDecoder = _ModifiedDecoder(
def StringDecoder(field_number, is_repeated, is_packed, key, new_default,
- is_strict_utf8=False, clear_if_default=False):
+ clear_if_default=False):
"""Returns a decoder for a string field."""
local_DecodeVarint = _DecodeVarint
- local_unicode = six.text_type
def _ConvertToUnicode(memview):
"""Convert byte to unicode."""
byte_str = memview.tobytes()
try:
- value = local_unicode(byte_str, 'utf-8')
+ value = str(byte_str, 'utf-8')
except UnicodeDecodeError as e:
# add more information to the error message and re-raise it.
e.reason = '%s in field: %s' % (e, key.full_name)
raise
- if is_strict_utf8 and six.PY2 and sys.maxunicode > _UCS2_MAXUNICODE:
- # Only do the check for python2 ucs4 when is_strict_utf8 enabled
- if _SURROGATE_PATTERN.search(value):
- reason = ('String field %s contains invalid UTF-8 data when parsing'
- 'a protocol buffer: surrogates not allowed. Use'
- 'the bytes type if you intend to send raw bytes.') % (
- key.full_name)
- raise message.DecodeError(reason)
-
return value
assert not is_packed
diff --git a/python/google/protobuf/internal/descriptor_database_test.py b/python/google/protobuf/internal/descriptor_database_test.py
index 619779a5d..ad3ca645f 100755..100644
--- a/python/google/protobuf/internal/descriptor_database_test.py
+++ b/python/google/protobuf/internal/descriptor_database_test.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
@@ -34,10 +32,7 @@
__author__ = 'matthewtoia@google.com (Matt Toia)'
-try:
- import unittest2 as unittest #PY26
-except ImportError:
- import unittest
+import unittest
import warnings
from google.protobuf import unittest_pb2
diff --git a/python/google/protobuf/internal/descriptor_pool_test.py b/python/google/protobuf/internal/descriptor_pool_test.py
index fed82bfc7..e59cf9b97 100755..100644
--- a/python/google/protobuf/internal/descriptor_pool_test.py
+++ b/python/google/protobuf/internal/descriptor_pool_test.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
@@ -36,13 +34,9 @@ __author__ = 'matthewtoia@google.com (Matt Toia)'
import copy
import os
+import unittest
import warnings
-try:
- import unittest2 as unittest #PY26
-except ImportError:
- import unittest
-
from google.protobuf import unittest_import_pb2
from google.protobuf import unittest_import_public_pb2
from google.protobuf import unittest_pb2
@@ -407,9 +401,19 @@ class DescriptorPoolTestBase(object):
# TODO(jieluo): Fix python and cpp extension diff.
return
self.pool = descriptor_pool.DescriptorPool()
- self.pool.AddSerializedFile(self.factory_test1_fd.SerializeToString())
- self.pool.AddSerializedFile(self.factory_test2_fd.SerializeToString())
+ file1 = self.pool.AddSerializedFile(
+ self.factory_test1_fd.SerializeToString())
+ file2 = self.pool.AddSerializedFile(
+ self.factory_test2_fd.SerializeToString())
+ self.assertEqual(file1.name,
+ 'google/protobuf/internal/factory_test1.proto')
+ self.assertEqual(file2.name,
+ 'google/protobuf/internal/factory_test2.proto')
self.testFindMessageTypeByName()
+ file_json = self.pool.AddSerializedFile(
+ more_messages_pb2.DESCRIPTOR.serialized_pb)
+ field = file_json.message_types_by_name['class'].fields_by_name['int_field']
+ self.assertEqual(field.json_name, 'json_int')
def testEnumDefaultValue(self):
diff --git a/python/google/protobuf/internal/descriptor_test.py b/python/google/protobuf/internal/descriptor_test.py
index 4fc80492b..88d7136bc 100755..100644
--- a/python/google/protobuf/internal/descriptor_test.py
+++ b/python/google/protobuf/internal/descriptor_test.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
@@ -34,14 +32,9 @@
__author__ = 'robinson@google.com (Will Robinson)'
-import sys
+import unittest
import warnings
-try:
- import unittest2 as unittest #PY26
-except ImportError:
- import unittest
-
from google.protobuf import unittest_custom_options_pb2
from google.protobuf import unittest_import_pb2
from google.protobuf import unittest_pb2
@@ -582,10 +575,7 @@ class GeneratedDescriptorTest(unittest.TestCase):
self.assertEqual(mapping, mapping)
self.assertGreater(len(mapping), 0) # Sized
self.assertEqual(len(mapping), len(excepted_dict)) # Iterable
- if sys.version_info >= (3,):
- key, item = next(iter(mapping.items()))
- else:
- key, item = mapping.items()[0]
+ key, item = next(iter(mapping.items()))
self.assertIn(key, mapping) # Container
self.assertEqual(mapping.get(key), item)
with self.assertRaises(TypeError):
@@ -598,13 +588,6 @@ class GeneratedDescriptorTest(unittest.TestCase):
# keys(), iterkeys() &co
item = (next(iter(mapping.keys())), next(iter(mapping.values())))
self.assertEqual(item, next(iter(mapping.items())))
- if sys.version_info < (3,):
- def CheckItems(seq, iterator):
- self.assertEqual(next(iterator), seq[0])
- self.assertEqual(list(iterator), seq[1:])
- CheckItems(mapping.keys(), mapping.iterkeys())
- CheckItems(mapping.values(), mapping.itervalues())
- CheckItems(mapping.items(), mapping.iteritems())
excepted_dict[key] = 'change value'
self.assertNotEqual(mapping, excepted_dict)
del excepted_dict[key]
diff --git a/python/google/protobuf/internal/encoder.py b/python/google/protobuf/internal/encoder.py
index 0c016f3cf..4b4f652f2 100644
--- a/python/google/protobuf/internal/encoder.py
+++ b/python/google/protobuf/internal/encoder.py
@@ -68,8 +68,6 @@ __author__ = 'kenton@google.com (Kenton Varda)'
import struct
-import six
-
from google.protobuf.internal import wire_format
@@ -372,7 +370,8 @@ def MapSizer(field_descriptor, is_message_map):
def _VarintEncoder():
"""Return an encoder for a basic varint value (does not include tag)."""
- local_int2byte = six.int2byte
+ local_int2byte = struct.Struct('>B').pack
+
def EncodeVarint(write, value, unused_deterministic=None):
bits = value & 0x7f
value >>= 7
@@ -389,7 +388,8 @@ def _SignedVarintEncoder():
"""Return an encoder for a basic signed varint value (does not include
tag)."""
- local_int2byte = six.int2byte
+ local_int2byte = struct.Struct('>B').pack
+
def EncodeSignedVarint(write, value, unused_deterministic=None):
if value < 0:
value += (1 << 64)
@@ -420,8 +420,7 @@ def _VarintBytes(value):
def TagBytes(field_number, wire_type):
"""Encode the given tag and return the bytes. Only called at startup."""
- return six.binary_type(
- _VarintBytes(wire_format.PackTag(field_number, wire_type)))
+ return bytes(_VarintBytes(wire_format.PackTag(field_number, wire_type)))
# --------------------------------------------------------------------
# As with sizers (see above), we have a number of common encoder
diff --git a/python/google/protobuf/internal/enum_type_wrapper.py b/python/google/protobuf/internal/enum_type_wrapper.py
index 9ae006658..9a53999a4 100644
--- a/python/google/protobuf/internal/enum_type_wrapper.py
+++ b/python/google/protobuf/internal/enum_type_wrapper.py
@@ -37,8 +37,6 @@ on proto classes. For usage, see:
__author__ = 'rabsatt@google.com (Kevin Rabsatt)'
-import six
-
class EnumTypeWrapper(object):
"""A utility for finding the names of enum values."""
@@ -57,7 +55,7 @@ class EnumTypeWrapper(object):
except KeyError:
pass # fall out to break exception chaining
- if not isinstance(number, six.integer_types):
+ if not isinstance(number, int):
raise TypeError(
'Enum value for {} must be an int, but got {} {!r}.'.format(
self._enum_type.name, type(number), number))
diff --git a/python/google/protobuf/internal/generator_test.py b/python/google/protobuf/internal/generator_test.py
index ab16d175d..0c4299a3d 100755..100644
--- a/python/google/protobuf/internal/generator_test.py
+++ b/python/google/protobuf/internal/generator_test.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
diff --git a/python/google/protobuf/internal/json_format_test.py b/python/google/protobuf/internal/json_format_test.py
index 0f2727e9c..af3713fcb 100755..100644
--- a/python/google/protobuf/internal/json_format_test.py
+++ b/python/google/protobuf/internal/json_format_test.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
@@ -37,12 +35,8 @@ __author__ = 'jieluo@google.com (Jie Luo)'
import json
import math
import struct
-import sys
-try:
- import unittest2 as unittest #PY26
-except ImportError:
- import unittest
+import unittest
from google.protobuf import any_pb2
from google.protobuf import duration_pb2
@@ -296,11 +290,8 @@ class JsonFormatTest(JsonFormatBase):
def testJsonEscapeString(self):
message = json_format_proto3_pb2.TestMessage()
- if sys.version_info[0] < 3:
- message.string_value = '&\n<\"\r>\b\t\f\\\001/\xe2\x80\xa8\xe2\x80\xa9'
- else:
- message.string_value = '&\n<\"\r>\b\t\f\\\001/'
- message.string_value += (b'\xe2\x80\xa8\xe2\x80\xa9').decode('utf-8')
+ message.string_value = '&\n<\"\r>\b\t\f\\\001/'
+ message.string_value += (b'\xe2\x80\xa8\xe2\x80\xa9').decode('utf-8')
self.assertEqual(
json_format.MessageToJson(message),
'{\n "stringValue": '
@@ -1039,8 +1030,6 @@ class JsonFormatTest(JsonFormatBase):
json_format.ParseError,
'Failed to parse boolMap field: Expected "true" or "false", not null.',
json_format.Parse, text, message)
- if sys.version_info < (2, 7):
- return
text = r'{"stringMap": {"a": 3, "\u0061": 2}}'
self.assertRaisesRegexp(
json_format.ParseError,
diff --git a/python/google/protobuf/internal/keywords_test.py b/python/google/protobuf/internal/keywords_test.py
index 87449280a..4182cf6be 100755..100644
--- a/python/google/protobuf/internal/keywords_test.py
+++ b/python/google/protobuf/internal/keywords_test.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
diff --git a/python/google/protobuf/internal/message_factory_test.py b/python/google/protobuf/internal/message_factory_test.py
index 42f91b236..97ef3aab5 100755..100644
--- a/python/google/protobuf/internal/message_factory_test.py
+++ b/python/google/protobuf/internal/message_factory_test.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
@@ -34,10 +32,7 @@
__author__ = 'matthewtoia@google.com (Matt Toia)'
-try:
- import unittest2 as unittest #PY26
-except ImportError:
- import unittest
+import unittest
from google.protobuf import descriptor_pb2
from google.protobuf.internal import api_implementation
diff --git a/python/google/protobuf/internal/message_test.py b/python/google/protobuf/internal/message_test.py
index 77122a287..6ed1f20ef 100755..100644
--- a/python/google/protobuf/internal/message_test.py
+++ b/python/google/protobuf/internal/message_test.py
@@ -1,6 +1,4 @@
-#! /usr/bin/env python
# -*- coding: utf-8 -*-
-#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
@@ -44,31 +42,17 @@ abstract interface.
__author__ = 'gps@google.com (Gregory P. Smith)'
-
+import collections
import copy
import math
import operator
import pickle
import pydoc
-import six
import sys
+import unittest
import warnings
-try:
- # Since python 3
- import collections.abc as collections_abc
-except ImportError:
- # Won't work after python 3.8
- import collections as collections_abc
-
-try:
- import unittest2 as unittest # PY26
-except ImportError:
- import unittest
-try:
- cmp # Python 2
-except NameError:
- cmp = lambda x, y: (x > y) - (x < y) # Python 3
+cmp = lambda x, y: (x > y) - (x < y)
from google.protobuf import map_proto2_unittest_pb2
from google.protobuf import map_unittest_pb2
@@ -89,22 +73,6 @@ from google.protobuf import message
from google.protobuf.internal import _parameterized
UCS2_MAXUNICODE = 65535
-if six.PY3:
- long = int
-
-
-# Python pre-2.6 does not have isinf() or isnan() functions, so we have
-# to provide our own.
-def isnan(val):
- # NaN is never equal to itself.
- return val != val
-def isinf(val):
- # Infinity times zero equals NaN.
- return not isnan(val) and isnan(val * 0)
-def IsPosInf(val):
- return isinf(val) and (val > 0)
-def IsNegInf(val):
- return isinf(val) and (val < 0)
warnings.simplefilter('error', DeprecationWarning)
@@ -243,10 +211,10 @@ class MessageTest(unittest.TestCase):
golden_message = message_module.TestAllTypes()
golden_message.ParseFromString(golden_data)
- self.assertTrue(IsPosInf(golden_message.optional_float))
- self.assertTrue(IsPosInf(golden_message.optional_double))
- self.assertTrue(IsPosInf(golden_message.repeated_float[0]))
- self.assertTrue(IsPosInf(golden_message.repeated_double[0]))
+ self.assertEqual(golden_message.optional_float, math.inf)
+ self.assertEqual(golden_message.optional_double, math.inf)
+ self.assertEqual(golden_message.repeated_float[0], math.inf)
+ self.assertEqual(golden_message.repeated_double[0], math.inf)
self.assertEqual(golden_data, golden_message.SerializeToString())
def testNegativeInfinity(self, message_module):
@@ -263,10 +231,10 @@ class MessageTest(unittest.TestCase):
golden_message = message_module.TestAllTypes()
golden_message.ParseFromString(golden_data)
- self.assertTrue(IsNegInf(golden_message.optional_float))
- self.assertTrue(IsNegInf(golden_message.optional_double))
- self.assertTrue(IsNegInf(golden_message.repeated_float[0]))
- self.assertTrue(IsNegInf(golden_message.repeated_double[0]))
+ self.assertEqual(golden_message.optional_float, -math.inf)
+ self.assertEqual(golden_message.optional_double, -math.inf)
+ self.assertEqual(golden_message.repeated_float[0], -math.inf)
+ self.assertEqual(golden_message.repeated_double[0], -math.inf)
self.assertEqual(golden_data, golden_message.SerializeToString())
def testNotANumber(self, message_module):
@@ -276,10 +244,10 @@ class MessageTest(unittest.TestCase):
b'\xD1\x02\x00\x00\x00\x00\x00\x00\xF8\x7F')
golden_message = message_module.TestAllTypes()
golden_message.ParseFromString(golden_data)
- self.assertTrue(isnan(golden_message.optional_float))
- self.assertTrue(isnan(golden_message.optional_double))
- self.assertTrue(isnan(golden_message.repeated_float[0]))
- self.assertTrue(isnan(golden_message.repeated_double[0]))
+ self.assertTrue(math.isnan(golden_message.optional_float))
+ self.assertTrue(math.isnan(golden_message.optional_double))
+ self.assertTrue(math.isnan(golden_message.repeated_float[0]))
+ self.assertTrue(math.isnan(golden_message.repeated_double[0]))
# The protocol buffer may serialize to any one of multiple different
# representations of a NaN. Rather than verify a specific representation,
@@ -288,18 +256,18 @@ class MessageTest(unittest.TestCase):
serialized = golden_message.SerializeToString()
message = message_module.TestAllTypes()
message.ParseFromString(serialized)
- self.assertTrue(isnan(message.optional_float))
- self.assertTrue(isnan(message.optional_double))
- self.assertTrue(isnan(message.repeated_float[0]))
- self.assertTrue(isnan(message.repeated_double[0]))
+ self.assertTrue(math.isnan(message.optional_float))
+ self.assertTrue(math.isnan(message.optional_double))
+ self.assertTrue(math.isnan(message.repeated_float[0]))
+ self.assertTrue(math.isnan(message.repeated_double[0]))
def testPositiveInfinityPacked(self, message_module):
golden_data = (b'\xA2\x06\x04\x00\x00\x80\x7F'
b'\xAA\x06\x08\x00\x00\x00\x00\x00\x00\xF0\x7F')
golden_message = message_module.TestPackedTypes()
golden_message.ParseFromString(golden_data)
- self.assertTrue(IsPosInf(golden_message.packed_float[0]))
- self.assertTrue(IsPosInf(golden_message.packed_double[0]))
+ self.assertEqual(golden_message.packed_float[0], math.inf)
+ self.assertEqual(golden_message.packed_double[0], math.inf)
self.assertEqual(golden_data, golden_message.SerializeToString())
def testNegativeInfinityPacked(self, message_module):
@@ -307,8 +275,8 @@ class MessageTest(unittest.TestCase):
b'\xAA\x06\x08\x00\x00\x00\x00\x00\x00\xF0\xFF')
golden_message = message_module.TestPackedTypes()
golden_message.ParseFromString(golden_data)
- self.assertTrue(IsNegInf(golden_message.packed_float[0]))
- self.assertTrue(IsNegInf(golden_message.packed_double[0]))
+ self.assertEqual(golden_message.packed_float[0], -math.inf)
+ self.assertEqual(golden_message.packed_double[0], -math.inf)
self.assertEqual(golden_data, golden_message.SerializeToString())
def testNotANumberPacked(self, message_module):
@@ -316,14 +284,14 @@ class MessageTest(unittest.TestCase):
b'\xAA\x06\x08\x00\x00\x00\x00\x00\x00\xF8\x7F')
golden_message = message_module.TestPackedTypes()
golden_message.ParseFromString(golden_data)
- self.assertTrue(isnan(golden_message.packed_float[0]))
- self.assertTrue(isnan(golden_message.packed_double[0]))
+ self.assertTrue(math.isnan(golden_message.packed_float[0]))
+ self.assertTrue(math.isnan(golden_message.packed_double[0]))
serialized = golden_message.SerializeToString()
message = message_module.TestPackedTypes()
message.ParseFromString(serialized)
- self.assertTrue(isnan(message.packed_float[0]))
- self.assertTrue(isnan(message.packed_double[0]))
+ self.assertTrue(math.isnan(message.packed_float[0]))
+ self.assertTrue(math.isnan(message.packed_double[0]))
def testExtremeFloatValues(self, message_module):
message = message_module.TestAllTypes()
@@ -451,10 +419,7 @@ class MessageTest(unittest.TestCase):
def testHighPrecisionDoublePrinting(self, message_module):
msg = message_module.TestAllTypes()
msg.optional_double = 0.12345678912345678
- if sys.version_info >= (3,):
- self.assertEqual(str(msg), 'optional_double: 0.12345678912345678\n')
- else:
- self.assertEqual(str(msg), 'optional_double: 0.123456789123\n')
+ self.assertEqual(str(msg), 'optional_double: 0.12345678912345678\n')
def testUnknownFieldPrinting(self, message_module):
populated = message_module.TestAllTypes()
@@ -694,7 +659,6 @@ class MessageTest(unittest.TestCase):
message = message_module.TestAllTypes()
get_bb = operator.attrgetter('bb')
- cmp_bb = lambda a, b: cmp(a.bb, b.bb)
message.repeated_nested_message.add().bb = 1
message.repeated_nested_message.add().bb = 3
message.repeated_nested_message.add().bb = 2
@@ -707,13 +671,6 @@ class MessageTest(unittest.TestCase):
message.repeated_nested_message.sort(key=get_bb, reverse=True)
self.assertEqual([k.bb for k in message.repeated_nested_message],
[6, 5, 4, 3, 2, 1])
- if sys.version_info >= (3,): return # No cmp sorting in PY3.
- message.repeated_nested_message.sort(sort_function=cmp_bb)
- self.assertEqual([k.bb for k in message.repeated_nested_message],
- [1, 2, 3, 4, 5, 6])
- message.repeated_nested_message.sort(cmp=cmp_bb, reverse=True)
- self.assertEqual([k.bb for k in message.repeated_nested_message],
- [6, 5, 4, 3, 2, 1])
def testRepeatedScalarFieldSortArguments(self, message_module):
"""Check sorting a scalar field using list.sort() arguments."""
@@ -726,12 +683,6 @@ class MessageTest(unittest.TestCase):
self.assertEqual(list(message.repeated_int32), [-1, -2, -3])
message.repeated_int32.sort(key=abs, reverse=True)
self.assertEqual(list(message.repeated_int32), [-3, -2, -1])
- if sys.version_info < (3,): # No cmp sorting in PY3.
- abs_cmp = lambda a, b: cmp(abs(a), abs(b))
- message.repeated_int32.sort(sort_function=abs_cmp)
- self.assertEqual(list(message.repeated_int32), [-1, -2, -3])
- message.repeated_int32.sort(cmp=abs_cmp, reverse=True)
- self.assertEqual(list(message.repeated_int32), [-3, -2, -1])
message.repeated_string.append('aaa')
message.repeated_string.append('bb')
@@ -740,12 +691,6 @@ class MessageTest(unittest.TestCase):
self.assertEqual(list(message.repeated_string), ['c', 'bb', 'aaa'])
message.repeated_string.sort(key=len, reverse=True)
self.assertEqual(list(message.repeated_string), ['aaa', 'bb', 'c'])
- if sys.version_info < (3,): # No cmp sorting in PY3.
- len_cmp = lambda a, b: cmp(len(a), len(b))
- message.repeated_string.sort(sort_function=len_cmp)
- self.assertEqual(list(message.repeated_string), ['c', 'bb', 'aaa'])
- message.repeated_string.sort(cmp=len_cmp, reverse=True)
- self.assertEqual(list(message.repeated_string), ['aaa', 'bb', 'c'])
def testRepeatedFieldsComparable(self, message_module):
m1 = message_module.TestAllTypes()
@@ -763,30 +708,11 @@ class MessageTest(unittest.TestCase):
m2.repeated_nested_message.add().bb = 2
m2.repeated_nested_message.add().bb = 3
- if sys.version_info >= (3,): return # No cmp() in PY3.
-
- # These comparisons should not raise errors.
- _ = m1 < m2
- _ = m1.repeated_nested_message < m2.repeated_nested_message
-
- # Make sure cmp always works. If it wasn't defined, these would be
- # id() comparisons and would all fail.
- self.assertEqual(cmp(m1, m2), 0)
- self.assertEqual(cmp(m1.repeated_int32, m2.repeated_int32), 0)
- self.assertEqual(cmp(m1.repeated_int32, [0, 1, 2]), 0)
- self.assertEqual(cmp(m1.repeated_nested_message,
- m2.repeated_nested_message), 0)
- with self.assertRaises(TypeError):
- # Can't compare repeated composite containers to lists.
- cmp(m1.repeated_nested_message, m2.repeated_nested_message[:])
-
- # TODO(anuraag): Implement extensiondict comparison in C++ and then add test
-
def testRepeatedFieldsAreSequences(self, message_module):
m = message_module.TestAllTypes()
- self.assertIsInstance(m.repeated_int32, collections_abc.MutableSequence)
+ self.assertIsInstance(m.repeated_int32, collections.abc.MutableSequence)
self.assertIsInstance(m.repeated_nested_message,
- collections_abc.MutableSequence)
+ collections.abc.MutableSequence)
def testRepeatedFieldsNotHashable(self, message_module):
m = message_module.TestAllTypes()
@@ -860,8 +786,8 @@ class MessageTest(unittest.TestCase):
# that a sub-sliced memoryview is not being used.
self.assertIsInstance(m1.optional_bytes, bytes)
self.assertIsInstance(m1.repeated_bytes[0], bytes)
- self.assertIsInstance(m1.optional_string, six.text_type)
- self.assertIsInstance(m1.repeated_string[0], six.text_type)
+ self.assertIsInstance(m1.optional_string, str)
+ self.assertIsInstance(m1.repeated_string[0], str)
def testMergeFromEmpty(self, message_module):
m1 = message_module.TestAllTypes()
@@ -1049,10 +975,10 @@ class MessageTest(unittest.TestCase):
in the value being converted to a Unicode string."""
m = message_module.TestAllTypes()
m.optional_string = str('')
- self.assertIsInstance(m.optional_string, six.text_type)
+ self.assertIsInstance(m.optional_string, str)
def testLongValuedSlice(self, message_module):
- """It should be possible to use long-valued indices in slices.
+ """It should be possible to use int-valued indices in slices.
This didn't used to work in the v2 C++ implementation.
"""
@@ -1060,12 +986,12 @@ class MessageTest(unittest.TestCase):
# Repeated scalar
m.repeated_int32.append(1)
- sl = m.repeated_int32[long(0):long(len(m.repeated_int32))]
+ sl = m.repeated_int32[int(0):int(len(m.repeated_int32))]
self.assertEqual(len(m.repeated_int32), len(sl))
# Repeated composite
m.repeated_nested_message.add().bb = 3
- sl = m.repeated_nested_message[long(0):long(len(m.repeated_nested_message))]
+ sl = m.repeated_nested_message[int(0):int(len(m.repeated_nested_message))]
self.assertEqual(len(m.repeated_nested_message), len(sl))
def testExtendShouldNotSwallowExceptions(self, message_module):
@@ -1794,7 +1720,7 @@ class Proto3Test(unittest.TestCase):
self.assertTrue(111 in msg.map_int32_bytes)
self.assertTrue(888 in msg.map_int32_enum)
- self.assertIsInstance(msg.map_string_string['abc'], six.text_type)
+ self.assertIsInstance(msg.map_string_string['abc'], str)
# Accessing an unset key still throws TypeError if the type of the key
# is incorrect.
@@ -1909,8 +1835,8 @@ class Proto3Test(unittest.TestCase):
self.assertEqual(key, unicode_obj)
self.assertEqual(value, unicode_obj)
- self.assertIsInstance(key, six.text_type)
- self.assertIsInstance(value, six.text_type)
+ self.assertIsInstance(key, str)
+ self.assertIsInstance(value, str)
def testMessageMap(self):
msg = map_unittest_pb2.TestMap()
@@ -2110,7 +2036,7 @@ class Proto3Test(unittest.TestCase):
with self.assertRaisesRegexp(
TypeError,
r'Parameter to MergeFrom\(\) must be instance of same class: expected '
- r'.*TestMap got int\.'):
+ r'.+TestMap got int\.'):
msg.MergeFrom(1)
def testCopyFromBadType(self):
@@ -2118,15 +2044,15 @@ class Proto3Test(unittest.TestCase):
with self.assertRaisesRegexp(
TypeError,
r'Parameter to [A-Za-z]*From\(\) must be instance of same class: '
- r'expected .*TestMap got int\.'):
+ r'expected .+TestMap got int\.'):
msg.CopyFrom(1)
def testIntegerMapWithLongs(self):
msg = map_unittest_pb2.TestMap()
- msg.map_int32_int32[long(-123)] = long(-456)
- msg.map_int64_int64[long(-2**33)] = long(-2**34)
- msg.map_uint32_uint32[long(123)] = long(456)
- msg.map_uint64_uint64[long(2**33)] = long(2**34)
+ msg.map_int32_int32[int(-123)] = int(-456)
+ msg.map_int64_int64[int(-2**33)] = int(-2**34)
+ msg.map_uint32_uint32[int(123)] = int(456)
+ msg.map_uint64_uint64[int(2**33)] = int(2**34)
serialized = msg.SerializeToString()
msg2 = map_unittest_pb2.TestMap()
@@ -2238,54 +2164,6 @@ class Proto3Test(unittest.TestCase):
matching_dict = {2: 4, 3: 6, 4: 8}
self.assertMapIterEquals(msg.map_int32_int32.items(), matching_dict)
- def testPython2Map(self):
- if sys.version_info < (3,):
- msg = map_unittest_pb2.TestMap()
- msg.map_int32_int32[2] = 4
- msg.map_int32_int32[3] = 6
- msg.map_int32_int32[4] = 8
- msg.map_int32_int32[5] = 10
- map_int32 = msg.map_int32_int32
- self.assertEqual(4, len(map_int32))
- msg2 = map_unittest_pb2.TestMap()
- msg2.ParseFromString(msg.SerializeToString())
-
- def CheckItems(seq, iterator):
- self.assertEqual(next(iterator), seq[0])
- self.assertEqual(list(iterator), seq[1:])
-
- CheckItems(map_int32.items(), map_int32.iteritems())
- CheckItems(map_int32.keys(), map_int32.iterkeys())
- CheckItems(map_int32.values(), map_int32.itervalues())
-
- self.assertEqual(6, map_int32.get(3))
- self.assertEqual(None, map_int32.get(999))
- self.assertEqual(6, map_int32.pop(3))
- self.assertEqual(0, map_int32.pop(3))
- self.assertEqual(3, len(map_int32))
- key, value = map_int32.popitem()
- self.assertEqual(2 * key, value)
- self.assertEqual(2, len(map_int32))
- map_int32.clear()
- self.assertEqual(0, len(map_int32))
-
- with self.assertRaises(KeyError):
- map_int32.popitem()
-
- self.assertEqual(0, map_int32.setdefault(2))
- self.assertEqual(1, len(map_int32))
-
- map_int32.update(msg2.map_int32_int32)
- self.assertEqual(4, len(map_int32))
-
- with self.assertRaises(TypeError):
- map_int32.update(msg2.map_int32_int32,
- msg2.map_int32_int32)
- with self.assertRaises(TypeError):
- map_int32.update(0)
- with self.assertRaises(TypeError):
- map_int32.update(value=12)
-
def testMapItems(self):
# Map items used to have strange behaviors when use c extension. Because
# [] may reorder the map and invalidate any exsting iterators.
@@ -2457,11 +2335,12 @@ class Proto3Test(unittest.TestCase):
def testMapsAreMapping(self):
msg = map_unittest_pb2.TestMap()
- self.assertIsInstance(msg.map_int32_int32, collections_abc.Mapping)
- self.assertIsInstance(msg.map_int32_int32, collections_abc.MutableMapping)
- self.assertIsInstance(msg.map_int32_foreign_message, collections_abc.Mapping)
+ self.assertIsInstance(msg.map_int32_int32, collections.abc.Mapping)
+ self.assertIsInstance(msg.map_int32_int32, collections.abc.MutableMapping)
+ self.assertIsInstance(msg.map_int32_foreign_message,
+ collections.abc.Mapping)
self.assertIsInstance(msg.map_int32_foreign_message,
- collections_abc.MutableMapping)
+ collections.abc.MutableMapping)
def testMapsCompare(self):
msg = map_unittest_pb2.TestMap()
@@ -2501,19 +2380,7 @@ class Proto3Test(unittest.TestCase):
optional_string=u'\ud001')
self.assertEqual(msg.optional_string, u'\ud001')
- @unittest.skipIf(six.PY2, 'Surrogates are acceptable in python2')
def testSurrogatesInPython3(self):
- # Surrogates like U+D83D is an invalid unicode character, it is
- # supported by Python2 only because in some builds, unicode strings
- # use 2-bytes code units. Since Python 3.3, we don't have this problem.
- #
- # Surrogates are utf16 code units, in a unicode string they are invalid
- # characters even when they appear in pairs like u'\ud801\udc01'. Protobuf
- # Python3 reject such cases at setters and parsers. Python2 accpect it
- # to keep same features with the language itself. 'Unpaired pairs'
- # like u'\ud801' are rejected at parsers when strict utf8 check is enabled
- # in proto3 to keep same behavior with c extension.
-
# Surrogates are rejected at setters in Python3.
with self.assertRaises(ValueError):
unittest_proto3_arena_pb2.TestAllTypes(
@@ -2528,33 +2395,6 @@ class Proto3Test(unittest.TestCase):
unittest_proto3_arena_pb2.TestAllTypes(
optional_string=u'\ud801\ud801')
- @unittest.skipIf(six.PY3 or sys.maxunicode == UCS2_MAXUNICODE,
- 'Surrogates are rejected at setters in Python3')
- def testSurrogatesInPython2(self):
- # Test optional_string=u'\ud801\udc01'.
- # surrogate pair is acceptable in python2.
- msg = unittest_proto3_arena_pb2.TestAllTypes(
- optional_string=u'\ud801\udc01')
- # TODO(jieluo): Change pure python to have same behavior with c extension.
- # Some build in python2 consider u'\ud801\udc01' and u'\U00010401' are
- # equal, some are not equal.
- if api_implementation.Type() == 'python':
- self.assertEqual(msg.optional_string, u'\ud801\udc01')
- else:
- self.assertEqual(msg.optional_string, u'\U00010401')
- serialized = msg.SerializeToString()
- msg2 = unittest_proto3_arena_pb2.TestAllTypes()
- msg2.MergeFromString(serialized)
- self.assertEqual(msg2.optional_string, u'\U00010401')
-
- # Python2 does not reject surrogates at setters.
- msg = unittest_proto3_arena_pb2.TestAllTypes(
- optional_string=b'\xed\xa0\x81')
- unittest_proto3_arena_pb2.TestAllTypes(
- optional_string=u'\ud801')
- unittest_proto3_arena_pb2.TestAllTypes(
- optional_string=u'\ud801\ud801')
-
@testing_refleaks.TestCase
class ValidTypeNamesTest(unittest.TestCase):
@@ -2636,9 +2476,8 @@ class PackedFieldTest(unittest.TestCase):
self.assertEqual(golden_data, message.SerializeToString())
-@unittest.skipIf(api_implementation.Type() != 'cpp' or
- sys.version_info < (2, 7),
- 'explicit tests of the C++ implementation for PY27 and above')
+@unittest.skipIf(api_implementation.Type() != 'cpp',
+ 'explicit tests of the C++ implementation')
@testing_refleaks.TestCase
class OversizeProtosTest(unittest.TestCase):
diff --git a/python/google/protobuf/internal/more_messages.proto b/python/google/protobuf/internal/more_messages.proto
index c5889c481..524dc701a 100644
--- a/python/google/protobuf/internal/more_messages.proto
+++ b/python/google/protobuf/internal/more_messages.proto
@@ -40,44 +40,44 @@ package google.protobuf.internal;
// canonicalization of serialized output, which should always be in tag order.
// We also mix in some extensions for extra fun.
message OutOfOrderFields {
- optional sint32 optional_sint32 = 5;
+ optional sint32 optional_sint32 = 5;
extensions 4 to 4;
- optional uint32 optional_uint32 = 3;
+ optional uint32 optional_uint32 = 3;
extensions 2 to 2;
- optional int32 optional_int32 = 1;
-};
-
+ optional int32 optional_int32 = 1;
+}
extend OutOfOrderFields {
- optional uint64 optional_uint64 = 4;
- optional int64 optional_int64 = 2;
+ optional uint64 optional_uint64 = 4;
+ optional int64 optional_int64 = 2;
}
-enum is { // top level enum keyword
+enum is { // top level enum keyword
default = 0;
- else = 1; // top level enum value keyword
+ else = 1; // top level enum value keyword
}
-message class { // message keyword
- optional int32 int_field = 1;
- optional int32 if = 2; // field keyword
- optional is as = 3; // enum field keyword
+message class { // message keyword
+ optional int32 int_field = 1 [json_name = "json_int"];
+ optional int32 if = 2; // field keyword
+ optional is as = 3; // enum field keyword
optional is enum_field = 4;
enum for { // nested enum keyword
default = 0;
- True = 1; // nested enum value keyword
+ True = 1; // nested enum value keyword
}
optional for nested_enum_field = 5;
message try {
optional int32 field = 1;
extensions 999 to 9999;
}
- optional try nested_message = 6;
+ optional try
+ nested_message = 6;
extensions 999 to 9999;
}
extend class {
- optional int32 continue = 1001; // top level extension keyword
+ optional int32 continue = 1001; // top level extension keyword
}
extend class.try {
@@ -86,7 +86,7 @@ extend class.try {
message ExtendClass {
extend class {
- optional int32 return = 1002; // nested extension keyword
+ optional int32 return = 1002; // nested extension keyword
}
}
diff --git a/python/google/protobuf/internal/proto_builder_test.py b/python/google/protobuf/internal/proto_builder_test.py
index d7d63c850..8e2afaf98 100755..100644
--- a/python/google/protobuf/internal/proto_builder_test.py
+++ b/python/google/protobuf/internal/proto_builder_test.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
diff --git a/python/google/protobuf/internal/python_message.py b/python/google/protobuf/internal/python_message.py
index 99d2f078d..2921d5cb6 100644
--- a/python/google/protobuf/internal/python_message.py
+++ b/python/google/protobuf/internal/python_message.py
@@ -55,9 +55,6 @@ import struct
import sys
import weakref
-import six
-from six.moves import range
-
# We use "as" to avoid name collisions with variables.
from google.protobuf.internal import api_implementation
from google.protobuf.internal import containers
@@ -284,13 +281,6 @@ def _IsMessageMapField(field):
return value_type.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE
-def _IsStrictUtf8Check(field):
- if field.containing_type.syntax != 'proto3':
- return False
- enforce_utf8 = True
- return enforce_utf8
-
-
def _AttachFieldHelpers(cls, field_descriptor):
is_repeated = (field_descriptor.label == _FieldDescriptor.LABEL_REPEATED)
is_packable = (is_repeated and
@@ -348,11 +338,10 @@ def _AttachFieldHelpers(cls, field_descriptor):
field_descriptor, _GetInitializeDefaultForMap(field_descriptor),
is_message_map)
elif decode_type == _FieldDescriptor.TYPE_STRING:
- is_strict_utf8_check = _IsStrictUtf8Check(field_descriptor)
field_decoder = decoder.StringDecoder(
field_descriptor.number, is_repeated, is_packed,
field_descriptor, field_descriptor._default_constructor,
- is_strict_utf8_check, clear_if_default)
+ clear_if_default)
elif field_descriptor.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE:
field_decoder = type_checkers.TYPE_TO_DECODER[decode_type](
field_descriptor.number, is_repeated, is_packed,
@@ -485,7 +474,7 @@ def _ReraiseTypeErrorWithFieldName(message_name, field_name):
exc = TypeError('%s for field %s.%s' % (str(exc), message_name, field_name))
# re-raise possibly-amended exception with original traceback:
- six.reraise(type(exc), exc, sys.exc_info()[2])
+ raise exc.with_traceback(sys.exc_info()[2])
def _AddInitMethod(message_descriptor, cls):
@@ -498,7 +487,7 @@ def _AddInitMethod(message_descriptor, cls):
enum_type with the same name. If the value is not a string, it's
returned as-is. (No conversion or bounds-checking is done.)
"""
- if isinstance(value, six.string_types):
+ if isinstance(value, str):
try:
return enum_type.values_by_name[value].number
except KeyError:
@@ -1305,6 +1294,14 @@ def _AddIsInitializedMethod(message_descriptor, cls):
cls.FindInitializationErrors = FindInitializationErrors
+def _FullyQualifiedClassName(klass):
+ module = klass.__module__
+ name = getattr(klass, '__qualname__', klass.__name__)
+ if module in (None, 'builtins', '__builtin__'):
+ return name
+ return module + '.' + name
+
+
def _AddMergeFromMethod(cls):
LABEL_REPEATED = _FieldDescriptor.LABEL_REPEATED
CPPTYPE_MESSAGE = _FieldDescriptor.CPPTYPE_MESSAGE
@@ -1313,7 +1310,8 @@ def _AddMergeFromMethod(cls):
if not isinstance(msg, cls):
raise TypeError(
'Parameter to MergeFrom() must be instance of same class: '
- 'expected %s got %s.' % (cls.__name__, msg.__class__.__name__))
+ 'expected %s got %s.' % (_FullyQualifiedClassName(cls),
+ _FullyQualifiedClassName(msg.__class__)))
assert msg is not self
self._Modified()
diff --git a/python/google/protobuf/internal/reflection_test.py b/python/google/protobuf/internal/reflection_test.py
index 2b9ed1cb5..9343389ed 100755..100644
--- a/python/google/protobuf/internal/reflection_test.py
+++ b/python/google/protobuf/internal/reflection_test.py
@@ -1,6 +1,4 @@
-#! /usr/bin/env python
# -*- coding: utf-8 -*-
-#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
@@ -38,14 +36,9 @@ pure-Python protocol compiler.
import copy
import gc
import operator
-import six
import struct
import warnings
-
-try:
- import unittest2 as unittest #PY26
-except ImportError:
- import unittest
+import unittest
from google.protobuf import unittest_import_pb2
from google.protobuf import unittest_mset_pb2
@@ -67,10 +60,6 @@ from google.protobuf.internal import decoder
from google.protobuf.internal import _parameterized
-if six.PY3:
- long = int # pylint: disable=redefined-builtin,invalid-name
-
-
warnings.simplefilter('error', DeprecationWarning)
@@ -411,7 +400,7 @@ class ReflectionTest(unittest.TestCase):
TestGetAndDeserialize('optional_int32', 1, int)
TestGetAndDeserialize('optional_int32', 1 << 30, int)
TestGetAndDeserialize('optional_uint32', 1 << 30, int)
- integer_64 = long
+ integer_64 = int
if struct.calcsize('L') == 4:
# Python only has signed ints, so 32-bit python can't fit an uint32
# in an int.
@@ -852,14 +841,14 @@ class ReflectionTest(unittest.TestCase):
setattr, proto, 'optional_bytes', u'unicode object')
# Check that the default value is of python's 'unicode' type.
- self.assertEqual(type(proto.optional_string), six.text_type)
+ self.assertEqual(type(proto.optional_string), str)
- proto.optional_string = six.text_type('Testing')
+ proto.optional_string = str('Testing')
self.assertEqual(proto.optional_string, str('Testing'))
# Assign a value of type 'str' which can be encoded in UTF-8.
proto.optional_string = str('Testing')
- self.assertEqual(proto.optional_string, six.text_type('Testing'))
+ self.assertEqual(proto.optional_string, str('Testing'))
# Try to assign a 'bytes' object which contains non-UTF-8.
self.assertRaises(ValueError,
@@ -874,8 +863,7 @@ class ReflectionTest(unittest.TestCase):
def testBytesInTextFormat(self, message_module):
proto = message_module.TestAllTypes(optional_bytes=b'\x00\x7f\x80\xff')
- self.assertEqual(u'optional_bytes: "\\000\\177\\200\\377"\n',
- six.text_type(proto))
+ self.assertEqual(u'optional_bytes: "\\000\\177\\200\\377"\n', str(proto))
def testEmptyNestedMessage(self, message_module):
proto = message_module.TestAllTypes()
@@ -1508,7 +1496,9 @@ class Proto2ReflectionTest(unittest.TestCase):
options=descriptor_pb2.MessageOptions(),
# pylint: disable=protected-access
create_key=descriptor._internal_create_key)
- class MyProtoClass(six.with_metaclass(reflection.GeneratedProtocolMessageType, message.Message)):
+
+ class MyProtoClass(
+ message.Message, metaclass=reflection.GeneratedProtocolMessageType):
DESCRIPTOR = mydescriptor
myproto_instance = MyProtoClass()
self.assertEqual(0, myproto_instance.foo_field)
@@ -1556,8 +1546,8 @@ class Proto2ReflectionTest(unittest.TestCase):
self.assertTrue('price' in desc.fields_by_name)
self.assertTrue('owners' in desc.fields_by_name)
- class CarMessage(six.with_metaclass(reflection.GeneratedProtocolMessageType,
- message.Message)):
+ class CarMessage(
+ message.Message, metaclass=reflection.GeneratedProtocolMessageType):
DESCRIPTOR = desc
prius = CarMessage()
@@ -2094,7 +2084,7 @@ class Proto2ReflectionTest(unittest.TestCase):
bytes_read = message2.MergeFromString(raw.item[0].message)
self.assertEqual(len(raw.item[0].message), bytes_read)
- self.assertEqual(type(message2.str), six.text_type)
+ self.assertEqual(type(message2.str), str)
self.assertEqual(message2.str, test_utf8)
# The pure Python API throws an exception on MergeFromString(),
@@ -3340,7 +3330,8 @@ class ClassAPITest(unittest.TestCase):
msg_descriptor = descriptor.MakeDescriptor(
file_descriptor.message_type[0])
- class MessageClass(six.with_metaclass(reflection.GeneratedProtocolMessageType, message.Message)):
+ class MessageClass(
+ message.Message, metaclass=reflection.GeneratedProtocolMessageType):
DESCRIPTOR = msg_descriptor
msg = MessageClass()
msg_str = (
diff --git a/python/google/protobuf/internal/service_reflection_test.py b/python/google/protobuf/internal/service_reflection_test.py
index 77239f446..8e72213b5 100755..100644
--- a/python/google/protobuf/internal/service_reflection_test.py
+++ b/python/google/protobuf/internal/service_reflection_test.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
@@ -35,10 +33,7 @@
__author__ = 'petar@google.com (Petar Petrov)'
-try:
- import unittest2 as unittest #PY26
-except ImportError:
- import unittest
+import unittest
from google.protobuf import unittest_pb2
from google.protobuf import service_reflection
diff --git a/python/google/protobuf/internal/symbol_database_test.py b/python/google/protobuf/internal/symbol_database_test.py
index af42681ae..4fdc4ee9c 100755..100644
--- a/python/google/protobuf/internal/symbol_database_test.py
+++ b/python/google/protobuf/internal/symbol_database_test.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
@@ -32,10 +30,7 @@
"""Tests for google.protobuf.symbol_database."""
-try:
- import unittest2 as unittest #PY26
-except ImportError:
- import unittest
+import unittest
from google.protobuf import unittest_pb2
from google.protobuf import descriptor
diff --git a/python/google/protobuf/internal/testing_refleaks.py b/python/google/protobuf/internal/testing_refleaks.py
index e448fceef..abe88ed57 100644
--- a/python/google/protobuf/internal/testing_refleaks.py
+++ b/python/google/protobuf/internal/testing_refleaks.py
@@ -38,18 +38,10 @@ If sys.gettotalrefcount() is not available (because Python was built without
the Py_DEBUG option), then this module is a no-op and tests will run normally.
"""
+import copyreg
import gc
import sys
-
-try:
- import copy_reg as copyreg #PY26
-except ImportError:
- import copyreg
-
-try:
- import unittest2 as unittest #PY26
-except ImportError:
- import unittest
+import unittest
class LocalTestResult(unittest.TestResult):
diff --git a/python/google/protobuf/internal/text_encoding_test.py b/python/google/protobuf/internal/text_encoding_test.py
index c7d182c44..f36a2cc5b 100755..100644
--- a/python/google/protobuf/internal/text_encoding_test.py
+++ b/python/google/protobuf/internal/text_encoding_test.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
@@ -32,10 +30,7 @@
"""Tests for google.protobuf.text_encoding."""
-try:
- import unittest2 as unittest #PY26
-except ImportError:
- import unittest
+import unittest
from google.protobuf import text_encoding
diff --git a/python/google/protobuf/internal/text_format_test.py b/python/google/protobuf/internal/text_format_test.py
index 6f75251db..82b98c181 100755..100644
--- a/python/google/protobuf/internal/text_format_test.py
+++ b/python/google/protobuf/internal/text_format_test.py
@@ -1,6 +1,4 @@
-#! /usr/bin/env python
# -*- coding: utf-8 -*-
-#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
@@ -39,13 +37,7 @@ import re
import string
import textwrap
-import six
-
-# pylint: disable=g-import-not-at-top
-try:
- import unittest2 as unittest # PY26
-except ImportError:
- import unittest
+import unittest
from google.protobuf import any_pb2
from google.protobuf import any_test_pb2
@@ -207,14 +199,10 @@ class TextFormatMessageToStringTests(TextFormatBase):
'repeated_double: 1.23456789\n'
'repeated_double: 1.234567898\n'
'repeated_double: 1.2345678987\n'
- 'repeated_double: 1.23456789876\n' +
- ('repeated_double: 1.23456789876\n'
- 'repeated_double: 1.23456789877\n'
- 'repeated_double: 1.23456789877\n'
- if six.PY2 else
- 'repeated_double: 1.234567898765\n'
- 'repeated_double: 1.2345678987654\n'
- 'repeated_double: 1.23456789876543\n') +
+ 'repeated_double: 1.23456789876\n'
+ 'repeated_double: 1.234567898765\n'
+ 'repeated_double: 1.2345678987654\n'
+ 'repeated_double: 1.23456789876543\n'
'repeated_double: 1.2e+100\n'
'repeated_double: 1.23e+100\n'
'repeated_double: 1.234e+100\n'
@@ -225,18 +213,14 @@ class TextFormatMessageToStringTests(TextFormatBase):
'repeated_double: 1.23456789e+100\n'
'repeated_double: 1.234567898e+100\n'
'repeated_double: 1.2345678987e+100\n'
- 'repeated_double: 1.23456789876e+100\n' +
- ('repeated_double: 1.23456789877e+100\n'
- 'repeated_double: 1.23456789877e+100\n'
- 'repeated_double: 1.23456789877e+100\n'
- if six.PY2 else
- 'repeated_double: 1.234567898765e+100\n'
- 'repeated_double: 1.2345678987654e+100\n'
- 'repeated_double: 1.23456789876543e+100\n'))
+ 'repeated_double: 1.23456789876e+100\n'
+ 'repeated_double: 1.234567898765e+100\n'
+ 'repeated_double: 1.2345678987654e+100\n'
+ 'repeated_double: 1.23456789876543e+100\n')
def testPrintExoticUnicodeSubclass(self, message_module):
- class UnicodeSub(six.text_type):
+ class UnicodeSub(str):
pass
message = message_module.TestAllTypes()
@@ -364,7 +348,7 @@ class TextFormatMessageToStringTests(TextFormatBase):
message.repeated_string.append(u'\u00fc\t\ua71f')
text = text_format.MessageToString(message, as_utf8=True)
golden_unicode = u'repeated_string: "\u00fc\\t\ua71f"\n'
- golden_text = golden_unicode if six.PY3 else golden_unicode.encode('utf-8')
+ golden_text = golden_unicode
# MessageToString always returns a native str.
self.CompareToGoldenText(text, golden_text)
parsed_message = message_module.TestAllTypes()
@@ -777,16 +761,18 @@ class TextFormatParserTests(TextFormatBase):
def testParseSingleWord(self, message_module):
message = message_module.TestAllTypes()
text = 'foo'
- six.assertRaisesRegex(self, text_format.ParseError, (
- r'1:1 : Message type "\w+.TestAllTypes" has no field named '
- r'"foo".'), text_format.Parse, text, message)
+ self.assertRaisesRegex(
+ text_format.ParseError,
+ (r'1:1 : Message type "\w+.TestAllTypes" has no field named '
+ r'"foo".'), text_format.Parse, text, message)
def testParseUnknownField(self, message_module):
message = message_module.TestAllTypes()
text = 'unknown_field: 8\n'
- six.assertRaisesRegex(self, text_format.ParseError, (
- r'1:1 : Message type "\w+.TestAllTypes" has no field named '
- r'"unknown_field".'), text_format.Parse, text, message)
+ self.assertRaisesRegex(
+ text_format.ParseError,
+ (r'1:1 : Message type "\w+.TestAllTypes" has no field named '
+ r'"unknown_field".'), text_format.Parse, text, message)
text = ('optional_int32: 123\n'
'unknown_field: 8\n'
'optional_nested_message { bb: 45 }')
@@ -797,19 +783,19 @@ class TextFormatParserTests(TextFormatBase):
def testParseBadEnumValue(self, message_module):
message = message_module.TestAllTypes()
text = 'optional_nested_enum: BARR'
- six.assertRaisesRegex(self, text_format.ParseError,
- (r'1:23 : \'optional_nested_enum: BARR\': '
- r'Enum type "\w+.TestAllTypes.NestedEnum" '
- r'has no value named BARR.'), text_format.Parse,
- text, message)
+ self.assertRaisesRegex(text_format.ParseError,
+ (r'1:23 : \'optional_nested_enum: BARR\': '
+ r'Enum type "\w+.TestAllTypes.NestedEnum" '
+ r'has no value named BARR.'), text_format.Parse,
+ text, message)
def testParseBadIntValue(self, message_module):
message = message_module.TestAllTypes()
text = 'optional_int32: bork'
- six.assertRaisesRegex(self, text_format.ParseError,
- ('1:17 : \'optional_int32: bork\': '
- 'Couldn\'t parse integer: bork'),
- text_format.Parse, text, message)
+ self.assertRaisesRegex(text_format.ParseError,
+ ('1:17 : \'optional_int32: bork\': '
+ 'Couldn\'t parse integer: bork'), text_format.Parse,
+ text, message)
def testParseStringFieldUnescape(self, message_module):
message = message_module.TestAllTypes()
@@ -842,8 +828,8 @@ class TextFormatParserTests(TextFormatBase):
def testParseMultipleOneof(self, message_module):
m_string = '\n'.join(['oneof_uint32: 11', 'oneof_string: "foo"'])
m2 = message_module.TestAllTypes()
- with six.assertRaisesRegex(self, text_format.ParseError,
- ' is specified along with field '):
+ with self.assertRaisesRegex(text_format.ParseError,
+ ' is specified along with field '):
text_format.Parse(m_string, m2)
# This example contains non-ASCII codepoint unicode data as literals
@@ -922,27 +908,28 @@ class TextFormatParserTests(TextFormatBase):
message = message_module.TestAllTypes()
text = ('optional_nested_message { bb: 1 } '
'optional_nested_message { bb: 2 }')
- six.assertRaisesRegex(self, text_format.ParseError, (
- r'1:59 : Message type "\w+.TestAllTypes" '
- r'should not have multiple "optional_nested_message" fields.'),
- text_format.Parse, text,
- message)
+ self.assertRaisesRegex(
+ text_format.ParseError,
+ (r'1:59 : Message type "\w+.TestAllTypes" '
+ r'should not have multiple "optional_nested_message" fields.'),
+ text_format.Parse, text, message)
def testParseDuplicateScalars(self, message_module):
message = message_module.TestAllTypes()
text = ('optional_int32: 42 ' 'optional_int32: 67')
- six.assertRaisesRegex(self, text_format.ParseError, (
- r'1:36 : Message type "\w+.TestAllTypes" should not '
- r'have multiple "optional_int32" fields.'), text_format.Parse, text,
- message)
+ self.assertRaisesRegex(
+ text_format.ParseError,
+ (r'1:36 : Message type "\w+.TestAllTypes" should not '
+ r'have multiple "optional_int32" fields.'), text_format.Parse, text,
+ message)
def testParseExistingScalarInMessage(self, message_module):
message = message_module.TestAllTypes(optional_int32=42)
text = 'optional_int32: 67'
- six.assertRaisesRegex(self, text_format.ParseError,
- (r'Message type "\w+.TestAllTypes" should not '
- r'have multiple "optional_int32" fields.'),
- text_format.Parse, text, message)
+ self.assertRaisesRegex(text_format.ParseError,
+ (r'Message type "\w+.TestAllTypes" should not '
+ r'have multiple "optional_int32" fields.'),
+ text_format.Parse, text, message)
@_parameterized.parameters(unittest_pb2, unittest_proto3_arena_pb2)
@@ -1398,14 +1385,14 @@ class Proto2Tests(TextFormatBase):
# Can't parse field number without set allow_field_number=True.
message = unittest_pb2.TestAllTypes()
text = '34:1\n'
- six.assertRaisesRegex(self, text_format.ParseError, (
- r'1:1 : Message type "\w+.TestAllTypes" has no field named '
- r'"34".'), text_format.Parse, text, message)
+ self.assertRaisesRegex(
+ text_format.ParseError,
+ (r'1:1 : Message type "\w+.TestAllTypes" has no field named '
+ r'"34".'), text_format.Parse, text, message)
# Can't parse if field number is not found.
text = '1234:1\n'
- six.assertRaisesRegex(
- self,
+ self.assertRaisesRegex(
text_format.ParseError,
(r'1:1 : Message type "\w+.TestAllTypes" has no field named '
r'"1234".'),
@@ -1492,13 +1479,13 @@ class Proto2Tests(TextFormatBase):
' i:\n' # Missing value.
' }\n'
'}\n')
- six.assertRaisesRegex(self,
- text_format.ParseError,
- 'Invalid field value: }',
- text_format.Parse,
- malformed,
- message,
- allow_unknown_extension=True)
+ self.assertRaisesRegex(
+ text_format.ParseError,
+ 'Invalid field value: }',
+ text_format.Parse,
+ malformed,
+ message,
+ allow_unknown_extension=True)
message = unittest_mset_pb2.TestMessageSetContainer()
malformed = ('message_set {\n'
@@ -1506,13 +1493,13 @@ class Proto2Tests(TextFormatBase):
' str: "malformed string\n' # Missing closing quote.
' }\n'
'}\n')
- six.assertRaisesRegex(self,
- text_format.ParseError,
- 'Invalid field value: "',
- text_format.Parse,
- malformed,
- message,
- allow_unknown_extension=True)
+ self.assertRaisesRegex(
+ text_format.ParseError,
+ 'Invalid field value: "',
+ text_format.Parse,
+ malformed,
+ message,
+ allow_unknown_extension=True)
message = unittest_mset_pb2.TestMessageSetContainer()
malformed = ('message_set {\n'
@@ -1520,13 +1507,13 @@ class Proto2Tests(TextFormatBase):
' str: "malformed\n multiline\n string\n'
' }\n'
'}\n')
- six.assertRaisesRegex(self,
- text_format.ParseError,
- 'Invalid field value: "',
- text_format.Parse,
- malformed,
- message,
- allow_unknown_extension=True)
+ self.assertRaisesRegex(
+ text_format.ParseError,
+ 'Invalid field value: "',
+ text_format.Parse,
+ malformed,
+ message,
+ allow_unknown_extension=True)
message = unittest_mset_pb2.TestMessageSetContainer()
malformed = ('message_set {\n'
@@ -1534,28 +1521,28 @@ class Proto2Tests(TextFormatBase):
' i: -5\n'
' \n' # Missing '>' here.
'}\n')
- six.assertRaisesRegex(self,
- text_format.ParseError,
- '5:1 : \'}\': Expected ">".',
- text_format.Parse,
- malformed,
- message,
- allow_unknown_extension=True)
+ self.assertRaisesRegex(
+ text_format.ParseError,
+ '5:1 : \'}\': Expected ">".',
+ text_format.Parse,
+ malformed,
+ message,
+ allow_unknown_extension=True)
# Don't allow unknown fields with allow_unknown_extension=True.
message = unittest_mset_pb2.TestMessageSetContainer()
malformed = ('message_set {\n'
' unknown_field: true\n'
'}\n')
- six.assertRaisesRegex(self,
- text_format.ParseError,
- ('2:3 : Message type '
- '"proto2_wireformat_unittest.TestMessageSet" has no'
- ' field named "unknown_field".'),
- text_format.Parse,
- malformed,
- message,
- allow_unknown_extension=True)
+ self.assertRaisesRegex(
+ text_format.ParseError,
+ ('2:3 : Message type '
+ '"proto2_wireformat_unittest.TestMessageSet" has no'
+ ' field named "unknown_field".'),
+ text_format.Parse,
+ malformed,
+ message,
+ allow_unknown_extension=True)
# Parse known extension correctly.
message = unittest_mset_pb2.TestMessageSetContainer()
@@ -1585,22 +1572,24 @@ class Proto2Tests(TextFormatBase):
def testParseBadExtension(self):
message = unittest_pb2.TestAllExtensions()
text = '[unknown_extension]: 8\n'
- six.assertRaisesRegex(self, text_format.ParseError,
- '1:2 : Extension "unknown_extension" not registered.',
- text_format.Parse, text, message)
+ self.assertRaisesRegex(
+ text_format.ParseError,
+ '1:2 : Extension "unknown_extension" not registered.',
+ text_format.Parse, text, message)
message = unittest_pb2.TestAllTypes()
- six.assertRaisesRegex(self, text_format.ParseError, (
- '1:2 : Message type "protobuf_unittest.TestAllTypes" does not have '
- 'extensions.'), text_format.Parse, text, message)
+ self.assertRaisesRegex(
+ text_format.ParseError,
+ ('1:2 : Message type "protobuf_unittest.TestAllTypes" does not have '
+ 'extensions.'), text_format.Parse, text, message)
def testParseNumericUnknownEnum(self):
message = unittest_pb2.TestAllTypes()
text = 'optional_nested_enum: 100'
- six.assertRaisesRegex(self, text_format.ParseError,
- (r'1:23 : \'optional_nested_enum: 100\': '
- r'Enum type "\w+.TestAllTypes.NestedEnum" '
- r'has no value with number 100.'), text_format.Parse,
- text, message)
+ self.assertRaisesRegex(text_format.ParseError,
+ (r'1:23 : \'optional_nested_enum: 100\': '
+ r'Enum type "\w+.TestAllTypes.NestedEnum" '
+ r'has no value with number 100.'),
+ text_format.Parse, text, message)
def testMergeDuplicateExtensionScalars(self):
message = unittest_pb2.TestAllExtensions()
@@ -1614,30 +1603,32 @@ class Proto2Tests(TextFormatBase):
message = unittest_pb2.TestAllExtensions()
text = ('[protobuf_unittest.optional_int32_extension]: 42 '
'[protobuf_unittest.optional_int32_extension]: 67')
- six.assertRaisesRegex(self, text_format.ParseError, (
- '1:96 : Message type "protobuf_unittest.TestAllExtensions" '
- 'should not have multiple '
- '"protobuf_unittest.optional_int32_extension" extensions.'),
- text_format.Parse, text, message)
+ self.assertRaisesRegex(
+ text_format.ParseError,
+ ('1:96 : Message type "protobuf_unittest.TestAllExtensions" '
+ 'should not have multiple '
+ '"protobuf_unittest.optional_int32_extension" extensions.'),
+ text_format.Parse, text, message)
def testParseDuplicateExtensionMessages(self):
message = unittest_pb2.TestAllExtensions()
text = ('[protobuf_unittest.optional_nested_message_extension]: {} '
'[protobuf_unittest.optional_nested_message_extension]: {}')
- six.assertRaisesRegex(self, text_format.ParseError, (
- '1:114 : Message type "protobuf_unittest.TestAllExtensions" '
- 'should not have multiple '
- '"protobuf_unittest.optional_nested_message_extension" extensions.'),
- text_format.Parse, text, message)
+ self.assertRaisesRegex(
+ text_format.ParseError,
+ ('1:114 : Message type "protobuf_unittest.TestAllExtensions" '
+ 'should not have multiple '
+ '"protobuf_unittest.optional_nested_message_extension" extensions.'),
+ text_format.Parse, text, message)
def testParseGroupNotClosed(self):
message = unittest_pb2.TestAllTypes()
text = 'RepeatedGroup: <'
- six.assertRaisesRegex(self, text_format.ParseError, '1:16 : Expected ">".',
- text_format.Parse, text, message)
+ self.assertRaisesRegex(text_format.ParseError, '1:16 : Expected ">".',
+ text_format.Parse, text, message)
text = 'RepeatedGroup: {'
- six.assertRaisesRegex(self, text_format.ParseError, '1:16 : Expected "}".',
- text_format.Parse, text, message)
+ self.assertRaisesRegex(text_format.ParseError, '1:16 : Expected "}".',
+ text_format.Parse, text, message)
def testParseEmptyGroup(self):
message = unittest_pb2.TestAllTypes()
diff --git a/python/google/protobuf/internal/type_checkers.py b/python/google/protobuf/internal/type_checkers.py
index eb66f9f6f..9b9b859e1 100644
--- a/python/google/protobuf/internal/type_checkers.py
+++ b/python/google/protobuf/internal/type_checkers.py
@@ -45,16 +45,8 @@ TYPE_TO_DESERIALIZE_METHOD: A dictionary with field types and deserialization
__author__ = 'robinson@google.com (Will Robinson)'
-try:
- import ctypes
-except Exception: # pylint: disable=broad-except
- ctypes = None
- import struct
+import ctypes
import numbers
-import six
-
-if six.PY3:
- long = int
from google.protobuf.internal import api_implementation
from google.protobuf.internal import decoder
@@ -66,10 +58,7 @@ _FieldDescriptor = descriptor.FieldDescriptor
def TruncateToFourByteFloat(original):
- if ctypes:
- return ctypes.c_float(original).value
- else:
- return struct.unpack('<f', struct.pack('<f', original))[0]
+ return ctypes.c_float(original).value
def ToShortestFloat(original):
@@ -162,14 +151,13 @@ class IntValueChecker(object):
def CheckValue(self, proposed_value):
if not isinstance(proposed_value, numbers.Integral):
message = ('%.1024r has type %s, but expected one of: %s' %
- (proposed_value, type(proposed_value), six.integer_types))
+ (proposed_value, type(proposed_value), (int,)))
raise TypeError(message)
if not self._MIN <= int(proposed_value) <= self._MAX:
raise ValueError('Value out of range: %d' % proposed_value)
- # We force 32-bit values to int and 64-bit values to long to make
- # alternate implementations where the distinction is more significant
- # (e.g. the C++ implementation) simpler.
- proposed_value = self._TYPE(proposed_value)
+ # We force all values to int to make alternate implementations where the
+ # distinction is more significant (e.g. the C++ implementation) simpler.
+ proposed_value = int(proposed_value)
return proposed_value
def DefaultValue(self):
@@ -186,7 +174,7 @@ class EnumValueChecker(object):
def CheckValue(self, proposed_value):
if not isinstance(proposed_value, numbers.Integral):
message = ('%.1024r has type %s, but expected one of: %s' %
- (proposed_value, type(proposed_value), six.integer_types))
+ (proposed_value, type(proposed_value), (int,)))
raise TypeError(message)
if int(proposed_value) not in self._enum_type.values_by_number:
raise ValueError('Unknown enum value: %d' % proposed_value)
@@ -204,9 +192,9 @@ class UnicodeValueChecker(object):
"""
def CheckValue(self, proposed_value):
- if not isinstance(proposed_value, (bytes, six.text_type)):
+ if not isinstance(proposed_value, (bytes, str)):
message = ('%.1024r has type %s, but expected one of: %s' %
- (proposed_value, type(proposed_value), (bytes, six.text_type)))
+ (proposed_value, type(proposed_value), (bytes, str)))
raise TypeError(message)
# If the value is of type 'bytes' make sure that it is valid UTF-8 data.
@@ -237,25 +225,21 @@ class Int32ValueChecker(IntValueChecker):
# efficient.
_MIN = -2147483648
_MAX = 2147483647
- _TYPE = int
class Uint32ValueChecker(IntValueChecker):
_MIN = 0
_MAX = (1 << 32) - 1
- _TYPE = int
class Int64ValueChecker(IntValueChecker):
_MIN = -(1 << 63)
_MAX = (1 << 63) - 1
- _TYPE = long
class Uint64ValueChecker(IntValueChecker):
_MIN = 0
_MAX = (1 << 64) - 1
- _TYPE = long
# The max 4 bytes float is about 3.4028234663852886e+38
diff --git a/python/google/protobuf/internal/unknown_fields_test.py b/python/google/protobuf/internal/unknown_fields_test.py
index d0ac5d905..e8caf6bb8 100755..100644
--- a/python/google/protobuf/internal/unknown_fields_test.py
+++ b/python/google/protobuf/internal/unknown_fields_test.py
@@ -1,6 +1,4 @@
-#! /usr/bin/env python
# -*- coding: utf-8 -*-
-#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
@@ -35,11 +33,9 @@
__author__ = 'bohdank@google.com (Bohdan Koval)'
-try:
- import unittest2 as unittest #PY26
-except ImportError:
- import unittest
import sys
+import unittest
+
from google.protobuf import map_unittest_pb2
from google.protobuf import unittest_mset_pb2
from google.protobuf import unittest_pb2
diff --git a/python/google/protobuf/internal/well_known_types_test.py b/python/google/protobuf/internal/well_known_types_test.py
index 8089f035c..d2632f9ce 100755..100644
--- a/python/google/protobuf/internal/well_known_types_test.py
+++ b/python/google/protobuf/internal/well_known_types_test.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
@@ -34,19 +32,9 @@
__author__ = 'jieluo@google.com (Jie Luo)'
+import collections.abc as collections_abc
import datetime
-
-try:
- # Since python 3
- import collections.abc as collections_abc
-except ImportError:
- # Won't work after python 3.8
- import collections as collections_abc
-
-try:
- import unittest2 as unittest #PY26
-except ImportError:
- import unittest
+import unittest
from google.protobuf import any_pb2
from google.protobuf import duration_pb2
diff --git a/python/google/protobuf/internal/wire_format_test.py b/python/google/protobuf/internal/wire_format_test.py
index da120f336..f7ad0c79a 100755..100644
--- a/python/google/protobuf/internal/wire_format_test.py
+++ b/python/google/protobuf/internal/wire_format_test.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
@@ -34,10 +32,7 @@
__author__ = 'robinson@google.com (Will Robinson)'
-try:
- import unittest2 as unittest #PY26
-except ImportError:
- import unittest
+import unittest
from google.protobuf import message
from google.protobuf.internal import wire_format
diff --git a/python/google/protobuf/json_format.py b/python/google/protobuf/json_format.py
index 965614d80..b3e85933e 100644
--- a/python/google/protobuf/json_format.py
+++ b/python/google/protobuf/json_format.py
@@ -42,24 +42,15 @@ Simple usage example:
__author__ = 'jieluo@google.com (Jie Luo)'
-# pylint: disable=g-statement-before-imports,g-import-not-at-top
-try:
- from collections import OrderedDict
-except ImportError:
- from ordereddict import OrderedDict # PY26
-# pylint: enable=g-statement-before-imports,g-import-not-at-top
import base64
+from collections import OrderedDict
import json
import math
-
from operator import methodcaller
-
import re
import sys
-import six
-
from google.protobuf.internal import type_checkers
from google.protobuf import descriptor
from google.protobuf import symbol_database
@@ -78,9 +69,8 @@ _INFINITY = 'Infinity'
_NEG_INFINITY = '-Infinity'
_NAN = 'NaN'
-_UNPAIRED_SURROGATE_PATTERN = re.compile(six.u(
- r'[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]'
-))
+_UNPAIRED_SURROGATE_PATTERN = re.compile(
+ u'[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]')
_VALID_EXTENSION_NAME = re.compile(r'\[[a-zA-Z0-9\._]*\]$')
@@ -426,7 +416,8 @@ def Parse(text, message, ignore_unknown_fields=False, descriptor_pool=None):
Raises::
ParseError: On JSON parsing problems.
"""
- if not isinstance(text, six.text_type): text = text.decode('utf-8')
+ if not isinstance(text, str):
+ text = text.decode('utf-8')
try:
js = json.loads(text, object_pairs_hook=_DuplicateChecker)
except ValueError as e:
@@ -455,7 +446,7 @@ def ParseDict(js_dict,
return message
-_INT_OR_FLOAT = six.integer_types + (float,)
+_INT_OR_FLOAT = (int, float)
class _Parser(object):
@@ -646,7 +637,7 @@ class _Parser(object):
message.null_value = 0
elif isinstance(value, bool):
message.bool_value = value
- elif isinstance(value, six.string_types):
+ elif isinstance(value, str):
message.string_value = value
elif isinstance(value, _INT_OR_FLOAT):
message.number_value = value
@@ -729,7 +720,7 @@ def _ConvertScalarFieldValue(value, field, require_str=False):
return _ConvertBool(value, require_str)
elif field.cpp_type == descriptor.FieldDescriptor.CPPTYPE_STRING:
if field.type == descriptor.FieldDescriptor.TYPE_BYTES:
- if isinstance(value, six.text_type):
+ if isinstance(value, str):
encoded = value.encode('utf-8')
else:
encoded = value
@@ -776,7 +767,7 @@ def _ConvertInteger(value):
if isinstance(value, float) and not value.is_integer():
raise ParseError('Couldn\'t parse integer: {0}.'.format(value))
- if isinstance(value, six.text_type) and value.find(' ') != -1:
+ if isinstance(value, str) and value.find(' ') != -1:
raise ParseError('Couldn\'t parse integer: "{0}".'.format(value))
if isinstance(value, bool):
diff --git a/python/google/protobuf/message_factory.py b/python/google/protobuf/message_factory.py
index 7dfaec88e..3656fa687 100644
--- a/python/google/protobuf/message_factory.py
+++ b/python/google/protobuf/message_factory.py
@@ -98,8 +98,6 @@ class MessageFactory(object):
A class describing the passed in descriptor.
"""
descriptor_name = descriptor.name
- if str is bytes: # PY2
- descriptor_name = descriptor.name.encode('ascii', 'ignore')
result_class = _GENERATED_PROTOCOL_MESSAGE_TYPE(
descriptor_name,
(message.Message,),
diff --git a/python/google/protobuf/proto_builder.py b/python/google/protobuf/proto_builder.py
index 2b7dddcbd..a4667ce63 100644
--- a/python/google/protobuf/proto_builder.py
+++ b/python/google/protobuf/proto_builder.py
@@ -30,10 +30,7 @@
"""Dynamic Protobuf class creator."""
-try:
- from collections import OrderedDict
-except ImportError:
- from ordereddict import OrderedDict #PY26
+from collections import OrderedDict
import hashlib
import os
diff --git a/python/google/protobuf/text_encoding.py b/python/google/protobuf/text_encoding.py
index 39898765f..759cf11f6 100644
--- a/python/google/protobuf/text_encoding.py
+++ b/python/google/protobuf/text_encoding.py
@@ -31,8 +31,6 @@
"""Encoding related utilities."""
import re
-import six
-
_cescape_chr_to_symbol_map = {}
_cescape_chr_to_symbol_map[9] = r'\t' # optional escape
_cescape_chr_to_symbol_map[10] = r'\n' # optional escape
@@ -72,14 +70,11 @@ def CEscape(text, as_utf8):
# escapes whereas our C++ unescaping function allows hex escapes to be any
# length. So, "\0011".encode('string_escape') ends up being "\\x011", which
# will be decoded in C++ as a single-character string with char code 0x11.
- if six.PY3:
- text_is_unicode = isinstance(text, str)
- if as_utf8 and text_is_unicode:
- # We're already unicode, no processing beyond control char escapes.
- return text.translate(_cescape_chr_to_symbol_map)
- ord_ = ord if text_is_unicode else lambda x: x # bytes iterate as ints.
- else:
- ord_ = ord # PY2
+ text_is_unicode = isinstance(text, str)
+ if as_utf8 and text_is_unicode:
+ # We're already unicode, no processing beyond control char escapes.
+ return text.translate(_cescape_chr_to_symbol_map)
+ ord_ = ord if text_is_unicode else lambda x: x # bytes iterate as ints.
if as_utf8:
return ''.join(_cescape_unicode_to_str[ord_(c)] for c in text)
return ''.join(_cescape_byte_to_str[ord_(c)] for c in text)
@@ -109,9 +104,7 @@ def CUnescape(text):
# allow single-digit hex escapes (like '\xf').
result = _CUNESCAPE_HEX.sub(ReplaceHex, text)
- if six.PY2:
- return result.decode('string_escape')
- return (result.encode('utf-8') # PY3: Make it bytes to allow decode.
+ return (result.encode('utf-8') # Make it bytes to allow decode.
.decode('unicode_escape')
# Make it bytes again to return the proper type.
.encode('raw_unicode_escape'))
diff --git a/python/google/protobuf/text_format.py b/python/google/protobuf/text_format.py
index 9c4ca90ee..412385c26 100644
--- a/python/google/protobuf/text_format.py
+++ b/python/google/protobuf/text_format.py
@@ -48,16 +48,12 @@ import encodings.unicode_escape # pylint: disable=unused-import
import io
import math
import re
-import six
from google.protobuf.internal import decoder
from google.protobuf.internal import type_checkers
from google.protobuf import descriptor
from google.protobuf import text_encoding
-if six.PY3:
- long = int # pylint: disable=redefined-builtin,invalid-name
-
# pylint: disable=g-import-not-at-top
__all__ = ['MessageToString', 'Parse', 'PrintMessage', 'PrintField',
'PrintFieldValue', 'Merge', 'MessageToBytes']
@@ -102,15 +98,9 @@ class ParseError(Error):
class TextWriter(object):
def __init__(self, as_utf8):
- if six.PY2:
- self._writer = io.BytesIO()
- else:
- self._writer = io.StringIO()
+ self._writer = io.StringIO()
def write(self, val):
- if six.PY2:
- if isinstance(val, six.text_type):
- val = val.encode('utf-8')
return self._writer.write(val)
def close(self):
@@ -562,7 +552,7 @@ class _Printer(object):
# Note: this is called only when value has at least one element.
self._PrintFieldName(field)
self.out.write(' [')
- for i in six.moves.range(len(value) - 1):
+ for i in range(len(value) - 1):
self.PrintFieldValue(field, value[i])
self.out.write(', ')
self.PrintFieldValue(field, value[-1])
@@ -608,7 +598,7 @@ class _Printer(object):
out.write(str(value))
elif field.cpp_type == descriptor.FieldDescriptor.CPPTYPE_STRING:
out.write('\"')
- if isinstance(value, six.text_type) and (six.PY2 or not self.as_utf8):
+ if isinstance(value, str) and not self.as_utf8:
out_value = value.encode('utf-8')
else:
out_value = value
@@ -839,12 +829,9 @@ class _Parser(object):
ParseError: On text parsing problems.
"""
# Tokenize expects native str lines.
- if six.PY2:
- str_lines = (line if isinstance(line, str) else line.encode('utf-8')
- for line in lines)
- else:
- str_lines = (line if isinstance(line, str) else line.decode('utf-8')
- for line in lines)
+ str_lines = (
+ line if isinstance(line, str) else line.decode('utf-8')
+ for line in lines)
tokenizer = Tokenizer(str_lines)
while not tokenizer.AtEnd():
self._MergeField(tokenizer, message)
@@ -1395,17 +1382,14 @@ class Tokenizer(object):
def TryConsumeInteger(self):
try:
- # Note: is_long only affects value type, not whether an error is raised.
self.ConsumeInteger()
return True
except ParseError:
return False
- def ConsumeInteger(self, is_long=False):
+ def ConsumeInteger(self):
"""Consumes an integer number.
- Args:
- is_long: True if the value should be returned as a long integer.
Returns:
The integer parsed.
@@ -1413,7 +1397,7 @@ class Tokenizer(object):
ParseError: If an integer couldn't be consumed.
"""
try:
- result = _ParseAbstractInteger(self.token, is_long=is_long)
+ result = _ParseAbstractInteger(self.token)
except ValueError as e:
raise self.ParseError(str(e))
self.NextToken()
@@ -1476,7 +1460,7 @@ class Tokenizer(object):
"""
the_bytes = self.ConsumeByteString()
try:
- return six.text_type(the_bytes, 'utf-8')
+ return str(the_bytes, 'utf-8')
except UnicodeDecodeError as e:
raise self._StringParseError(e)
@@ -1650,14 +1634,6 @@ def _ConsumeUint64(tokenizer):
return _ConsumeInteger(tokenizer, is_signed=False, is_long=True)
-def _TryConsumeInteger(tokenizer, is_signed=False, is_long=False):
- try:
- _ConsumeInteger(tokenizer, is_signed=is_signed, is_long=is_long)
- return True
- except ParseError:
- return False
-
-
def _ConsumeInteger(tokenizer, is_signed=False, is_long=False):
"""Consumes an integer number from tokenizer.
@@ -1695,7 +1671,7 @@ def ParseInteger(text, is_signed=False, is_long=False):
ValueError: Thrown Iff the text is not a valid integer.
"""
# Do the actual parsing. Exception handling is propagated to caller.
- result = _ParseAbstractInteger(text, is_long=is_long)
+ result = _ParseAbstractInteger(text)
# Check if the integer is sane. Exceptions handled by callers.
checker = _INTEGER_CHECKERS[2 * int(is_long) + int(is_signed)]
@@ -1703,12 +1679,11 @@ def ParseInteger(text, is_signed=False, is_long=False):
return result
-def _ParseAbstractInteger(text, is_long=False):
+def _ParseAbstractInteger(text):
"""Parses an integer without checking size/signedness.
Args:
text: The text to parse.
- is_long: True if the value should be returned as a long integer.
Returns:
The integer value.
@@ -1724,13 +1699,7 @@ def _ParseAbstractInteger(text, is_long=False):
# we always use the '0o' prefix for multi-digit numbers starting with 0.
text = c_octal_match.group(1) + '0o' + c_octal_match.group(2)
try:
- # We force 32-bit values to int and 64-bit values to long to make
- # alternate implementations where the distinction is more significant
- # (e.g. the C++ implementation) simpler.
- if is_long:
- return long(text, 0)
- else:
- return int(text, 0)
+ return int(text, 0)
except ValueError:
raise ValueError('Couldn\'t parse integer: %s' % orig_text)
diff --git a/src/Makefile.am b/src/Makefile.am
index fbd0a41e2..00b27a25f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -73,15 +73,19 @@ nobase_include_HEADERS = \
google/protobuf/arenastring.h \
google/protobuf/compiler/code_generator.h \
google/protobuf/compiler/command_line_interface.h \
+ google/protobuf/compiler/cpp/cpp_file.h \
google/protobuf/compiler/cpp/cpp_generator.h \
+ google/protobuf/compiler/cpp/cpp_helpers.h \
+ google/protobuf/compiler/cpp/cpp_names.h \
+ google/protobuf/compiler/csharp/csharp_doc_comment.h \
google/protobuf/compiler/csharp/csharp_generator.h \
google/protobuf/compiler/csharp/csharp_names.h \
+ google/protobuf/compiler/csharp/csharp_options.h \
google/protobuf/compiler/importer.h \
google/protobuf/compiler/java/java_generator.h \
google/protobuf/compiler/java/java_kotlin_generator.h \
google/protobuf/compiler/java/java_names.h \
google/protobuf/compiler/js/js_generator.h \
- google/protobuf/compiler/js/well_known_types_embed.h \
google/protobuf/compiler/objectivec/objectivec_generator.h \
google/protobuf/compiler/objectivec/objectivec_helpers.h \
google/protobuf/compiler/parser.h \
@@ -105,6 +109,7 @@ nobase_include_HEADERS = \
google/protobuf/generated_message_bases.h \
google/protobuf/generated_message_reflection.h \
google/protobuf/generated_message_table_driven.h \
+ google/protobuf/generated_message_table_driven_lite.h \
google/protobuf/generated_message_tctable_decl.h \
google/protobuf/generated_message_tctable_impl.h \
google/protobuf/generated_message_tctable_impl.inc \
@@ -133,15 +138,14 @@ nobase_include_HEADERS = \
google/protobuf/metadata.h \
google/protobuf/metadata_lite.h \
google/protobuf/parse_context.h \
+ google/protobuf/port.h \
google/protobuf/port_def.inc \
google/protobuf/port_undef.inc \
- google/protobuf/port.h \
google/protobuf/reflection.h \
google/protobuf/reflection_ops.h \
google/protobuf/repeated_field.h \
google/protobuf/service.h \
google/protobuf/source_context.pb.h \
- google/protobuf/string_member_robber.h \
google/protobuf/struct.pb.h \
google/protobuf/stubs/bytestream.h \
google/protobuf/stubs/callback.h \
@@ -191,7 +195,7 @@ libprotobuf_lite_la_SOURCES = \
google/protobuf/extension_set.cc \
google/protobuf/generated_enum_util.cc \
google/protobuf/generated_message_table_driven_lite.cc \
- google/protobuf/generated_message_table_driven_lite.h \
+ google/protobuf/generated_message_tctable_lite.cc \
google/protobuf/generated_message_util.cc \
google/protobuf/implicit_weak_message.cc \
google/protobuf/inlined_string_field.cc \
@@ -205,21 +209,17 @@ libprotobuf_lite_la_SOURCES = \
google/protobuf/message_lite.cc \
google/protobuf/parse_context.cc \
google/protobuf/repeated_field.cc \
+ google/protobuf/string_member_robber.h \
google/protobuf/stubs/bytestream.cc \
- google/protobuf/stubs/bytestream.h \
google/protobuf/stubs/common.cc \
- google/protobuf/stubs/hash.h \
google/protobuf/stubs/int128.cc \
google/protobuf/stubs/int128.h \
- google/protobuf/stubs/map_util.h \
google/protobuf/stubs/mathutil.h \
- google/protobuf/stubs/status_macros.h \
google/protobuf/stubs/status.cc \
- google/protobuf/stubs/status.h \
+ google/protobuf/stubs/status_macros.h \
google/protobuf/stubs/statusor.cc \
google/protobuf/stubs/statusor.h \
google/protobuf/stubs/stringpiece.cc \
- google/protobuf/stubs/stringpiece.h \
google/protobuf/stubs/stringprintf.cc \
google/protobuf/stubs/stringprintf.h \
google/protobuf/stubs/structurally_valid.cc \
@@ -252,7 +252,7 @@ libprotobuf_la_SOURCES = \
google/protobuf/generated_message_bases.cc \
google/protobuf/generated_message_reflection.cc \
google/protobuf/generated_message_table_driven.cc \
- google/protobuf/generated_message_table_driven_lite.h \
+ google/protobuf/generated_message_tctable_full.cc \
google/protobuf/io/gzip_stream.cc \
google/protobuf/io/printer.cc \
google/protobuf/io/tokenizer.cc \
@@ -303,7 +303,6 @@ libprotobuf_la_SOURCES = \
google/protobuf/util/internal/structured_objectwriter.h \
google/protobuf/util/internal/type_info.cc \
google/protobuf/util/internal/type_info.h \
- google/protobuf/util/internal/type_info_test_helper.cc \
google/protobuf/util/internal/type_info_test_helper.h \
google/protobuf/util/internal/utility.cc \
google/protobuf/util/internal/utility.h \
@@ -334,10 +333,8 @@ libprotoc_la_SOURCES = \
google/protobuf/compiler/cpp/cpp_field.cc \
google/protobuf/compiler/cpp/cpp_field.h \
google/protobuf/compiler/cpp/cpp_file.cc \
- google/protobuf/compiler/cpp/cpp_file.h \
google/protobuf/compiler/cpp/cpp_generator.cc \
google/protobuf/compiler/cpp/cpp_helpers.cc \
- google/protobuf/compiler/cpp/cpp_helpers.h \
google/protobuf/compiler/cpp/cpp_map_field.cc \
google/protobuf/compiler/cpp/cpp_map_field.h \
google/protobuf/compiler/cpp/cpp_message.cc \
@@ -345,7 +342,6 @@ libprotoc_la_SOURCES = \
google/protobuf/compiler/cpp/cpp_message_field.cc \
google/protobuf/compiler/cpp/cpp_message_field.h \
google/protobuf/compiler/cpp/cpp_message_layout_helper.h \
- google/protobuf/compiler/cpp/cpp_names.h \
google/protobuf/compiler/cpp/cpp_options.h \
google/protobuf/compiler/cpp/cpp_padding_optimizer.cc \
google/protobuf/compiler/cpp/cpp_padding_optimizer.h \
@@ -358,7 +354,6 @@ libprotoc_la_SOURCES = \
google/protobuf/compiler/cpp/cpp_string_field.cc \
google/protobuf/compiler/cpp/cpp_string_field.h \
google/protobuf/compiler/csharp/csharp_doc_comment.cc \
- google/protobuf/compiler/csharp/csharp_doc_comment.h \
google/protobuf/compiler/csharp/csharp_enum.cc \
google/protobuf/compiler/csharp/csharp_enum.h \
google/protobuf/compiler/csharp/csharp_enum_field.cc \
@@ -374,11 +369,10 @@ libprotoc_la_SOURCES = \
google/protobuf/compiler/csharp/csharp_message.h \
google/protobuf/compiler/csharp/csharp_message_field.cc \
google/protobuf/compiler/csharp/csharp_message_field.h \
- google/protobuf/compiler/csharp/csharp_options.h \
google/protobuf/compiler/csharp/csharp_primitive_field.cc \
google/protobuf/compiler/csharp/csharp_primitive_field.h \
- google/protobuf/compiler/csharp/csharp_reflection_class.cc \
- google/protobuf/compiler/csharp/csharp_reflection_class.h \
+ google/protobuf/compiler/csharp/csharp_reflection_class.cc \
+ google/protobuf/compiler/csharp/csharp_reflection_class.h \
google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc \
google/protobuf/compiler/csharp/csharp_repeated_enum_field.h \
google/protobuf/compiler/csharp/csharp_repeated_message_field.cc \
@@ -448,6 +442,7 @@ libprotoc_la_SOURCES = \
google/protobuf/compiler/java/java_string_field_lite.h \
google/protobuf/compiler/js/js_generator.cc \
google/protobuf/compiler/js/well_known_types_embed.cc \
+ google/protobuf/compiler/js/well_known_types_embed.h \
google/protobuf/compiler/objectivec/objectivec_enum.cc \
google/protobuf/compiler/objectivec/objectivec_enum.h \
google/protobuf/compiler/objectivec/objectivec_enum_field.cc \
@@ -460,7 +455,6 @@ libprotoc_la_SOURCES = \
google/protobuf/compiler/objectivec/objectivec_file.h \
google/protobuf/compiler/objectivec/objectivec_generator.cc \
google/protobuf/compiler/objectivec/objectivec_helpers.cc \
- google/protobuf/compiler/objectivec/objectivec_helpers.h \
google/protobuf/compiler/objectivec/objectivec_map_field.cc \
google/protobuf/compiler/objectivec/objectivec_map_field.h \
google/protobuf/compiler/objectivec/objectivec_message.cc \
@@ -542,18 +536,18 @@ protoc_inputs = \
EXTRA_DIST = \
$(protoc_inputs) \
- solaris/libstdc++.la \
+ README.md \
google/protobuf/compiler/package_info.h \
google/protobuf/compiler/ruby/ruby_generated_code.proto \
google/protobuf/compiler/ruby/ruby_generated_code_pb.rb \
- google/protobuf/compiler/ruby/ruby_generated_code_proto2.proto \
- google/protobuf/compiler/ruby/ruby_generated_code_proto2_pb.rb \
- google/protobuf/compiler/ruby/ruby_generated_pkg_explicit.proto \
+ google/protobuf/compiler/ruby/ruby_generated_code_proto2.proto \
+ google/protobuf/compiler/ruby/ruby_generated_code_proto2_pb.rb \
+ google/protobuf/compiler/ruby/ruby_generated_pkg_explicit.proto \
google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy.proto \
google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy_pb.rb \
- google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_pb.rb \
- google/protobuf/compiler/ruby/ruby_generated_pkg_implicit.proto \
- google/protobuf/compiler/ruby/ruby_generated_pkg_implicit_pb.rb \
+ google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_pb.rb \
+ google/protobuf/compiler/ruby/ruby_generated_pkg_implicit.proto \
+ google/protobuf/compiler/ruby/ruby_generated_pkg_implicit_pb.rb \
google/protobuf/compiler/zip_output_unittest.sh \
google/protobuf/io/gzip_stream.h \
google/protobuf/io/gzip_stream_unittest.sh \
@@ -569,16 +563,16 @@ EXTRA_DIST = \
google/protobuf/testdata/golden_packed_fields_message \
google/protobuf/testdata/map_test_data.txt \
google/protobuf/testdata/text_format_unittest_data.txt \
- google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt \
- google/protobuf/testdata/text_format_unittest_data_pointy.txt \
- google/protobuf/testdata/text_format_unittest_data_pointy_oneof.txt \
- google/protobuf/testdata/text_format_unittest_extensions_data.txt \
- google/protobuf/testdata/text_format_unittest_extensions_data_pointy.txt \
+ google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt \
+ google/protobuf/testdata/text_format_unittest_data_pointy.txt \
+ google/protobuf/testdata/text_format_unittest_data_pointy_oneof.txt \
+ google/protobuf/testdata/text_format_unittest_extensions_data.txt \
+ google/protobuf/testdata/text_format_unittest_extensions_data_pointy.txt \
google/protobuf/util/package_info.h \
libprotobuf-lite.map \
libprotobuf.map \
libprotoc.map \
- README.md
+ solaris/libstdc++.la
protoc_lite_outputs = \
google/protobuf/map_lite_unittest.pb.cc \
@@ -703,11 +697,9 @@ endif
$(protoc_outputs): unittest_proto_middleman
COMMON_TEST_SOURCES = \
- google/protobuf/arena_test_util.cc \
- google/protobuf/arena_test_util.h \
+ $(COMMON_LITE_TEST_SOURCES) \
+ google/protobuf/compiler/cpp/cpp_unittest.h \
google/protobuf/map_test_util.h \
- google/protobuf/map_test_util.inc \
- google/protobuf/map_test_util_impl.h \
google/protobuf/reflection_tester.cc \
google/protobuf/reflection_tester.h \
google/protobuf/test_util.cc \
@@ -737,6 +729,7 @@ protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \
# See configure.ac for more info.
protobuf_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
protobuf_test_SOURCES = \
+ $(COMMON_TEST_SOURCES) \
google/protobuf/any_test.cc \
google/protobuf/arena_unittest.cc \
google/protobuf/arenastring_unittest.cc \
@@ -747,7 +740,6 @@ protobuf_test_SOURCES = \
google/protobuf/compiler/cpp/cpp_move_unittest.cc \
google/protobuf/compiler/cpp/cpp_plugin_unittest.cc \
google/protobuf/compiler/cpp/cpp_unittest.cc \
- google/protobuf/compiler/cpp/cpp_unittest.h \
google/protobuf/compiler/cpp/cpp_unittest.inc \
google/protobuf/compiler/cpp/metadata_test.cc \
google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc \
@@ -815,8 +807,7 @@ protobuf_test_SOURCES = \
google/protobuf/util/type_resolver_util_test.cc \
google/protobuf/well_known_types_unittest.cc \
google/protobuf/wire_format_unittest.cc \
- google/protobuf/wire_format_unittest.inc \
- $(COMMON_TEST_SOURCES)
+ google/protobuf/wire_format_unittest.inc
nodist_protobuf_test_SOURCES = $(protoc_outputs)
$(am_protobuf_test_OBJECTS): unittest_proto_middleman
@@ -842,6 +833,7 @@ COMMON_LITE_TEST_SOURCES = \
google/protobuf/arena_test_util.h \
google/protobuf/map_lite_test_util.cc \
google/protobuf/map_lite_test_util.h \
+ google/protobuf/map_test_util_impl.h \
google/protobuf/test_util_lite.cc \
google/protobuf/test_util_lite.h
diff --git a/src/google/protobuf/any.pb.cc b/src/google/protobuf/any.pb.cc
index d3b1b4c22..52c6ccca2 100644
--- a/src/google/protobuf/any.pb.cc
+++ b/src/google/protobuf/any.pb.cc
@@ -36,7 +36,7 @@ static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fany_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fany_2eproto = nullptr;
-const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fany_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
+const uint32_t TableStruct_google_2fprotobuf_2fany_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Any, _internal_metadata_),
~0u, // no _extensions_
@@ -112,11 +112,17 @@ Any::Any(const Any& from)
_any_metadata_(&type_url_, &value_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_type_url().empty()) {
type_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_type_url(),
GetArenaForAllocation());
}
value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_value().empty()) {
value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_value(),
GetArenaForAllocation());
@@ -126,7 +132,13 @@ Any::Any(const Any& from)
inline void Any::SharedCtor() {
type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
Any::~Any() {
@@ -154,7 +166,7 @@ void Any::SetCachedSize(int size) const {
void Any::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Any)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -166,12 +178,12 @@ void Any::Clear() {
const char* Any::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// string type_url = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_type_url();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Any.type_url"));
@@ -181,7 +193,7 @@ const char* Any::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern
continue;
// bytes value = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
auto str = _internal_mutable_value();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
@@ -211,10 +223,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* Any::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* Any::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Any)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// string type_url = 1;
@@ -245,7 +257,7 @@ size_t Any::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Any)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -282,7 +294,7 @@ void Any::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void Any::MergeFrom(const Any& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Any)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_type_url().empty()) {
diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h
index b1b70f507..f60191396 100644
--- a/src/google/protobuf/any.pb.h
+++ b/src/google/protobuf/any.pb.h
@@ -50,7 +50,7 @@ struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fany_2eproto {
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
- static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
+ static const uint32_t offsets[];
};
PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fany_2eproto;
PROTOBUF_NAMESPACE_OPEN
@@ -191,8 +191,8 @@ class PROTOBUF_EXPORT Any final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -320,6 +320,11 @@ inline void Any::set_allocated_type_url(std::string* type_url) {
}
type_url_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), type_url,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (type_url_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url)
}
@@ -366,6 +371,11 @@ inline void Any::set_allocated_value(std::string* value) {
}
value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (value_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value)
}
diff --git a/src/google/protobuf/api.pb.cc b/src/google/protobuf/api.pb.cc
index d3fb1dd52..72cc72e03 100644
--- a/src/google/protobuf/api.pb.cc
+++ b/src/google/protobuf/api.pb.cc
@@ -73,7 +73,7 @@ static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fapi_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fapi_2eproto = nullptr;
-const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fapi_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
+const uint32_t TableStruct_google_2fprotobuf_2fapi_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, _internal_metadata_),
~0u, // no _extensions_
@@ -200,11 +200,17 @@ Api::Api(const Api& from)
mixins_(from.mixins_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
}
version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_version().empty()) {
version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_version(),
GetArenaForAllocation());
@@ -220,7 +226,13 @@ Api::Api(const Api& from)
inline void Api::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&source_context_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&syntax_) -
@@ -253,7 +265,7 @@ void Api::SetCachedSize(int size) const {
void Api::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Api)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -273,12 +285,12 @@ void Api::Clear() {
const char* Api::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// string name = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Api.name"));
@@ -288,7 +300,7 @@ const char* Api::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern
continue;
// repeated .google.protobuf.Method methods = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
@@ -301,7 +313,7 @@ const char* Api::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern
continue;
// repeated .google.protobuf.Option options = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
@@ -314,7 +326,7 @@ const char* Api::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern
continue;
// string version = 4;
case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
auto str = _internal_mutable_version();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Api.version"));
@@ -324,7 +336,7 @@ const char* Api::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern
continue;
// .google.protobuf.SourceContext source_context = 5;
case 5:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
ptr = ctx->ParseMessage(_internal_mutable_source_context(), ptr);
CHK_(ptr);
} else
@@ -332,7 +344,7 @@ const char* Api::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern
continue;
// repeated .google.protobuf.Mixin mixins = 6;
case 6:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
ptr -= 1;
do {
ptr += 1;
@@ -345,8 +357,8 @@ const char* Api::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern
continue;
// .google.protobuf.Syntax syntax = 7;
case 7:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
- ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
+ uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
_internal_set_syntax(static_cast<::PROTOBUF_NAMESPACE_ID::Syntax>(val));
} else
@@ -375,10 +387,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* Api::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* Api::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Api)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// string name = 1;
@@ -452,7 +464,7 @@ size_t Api::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Api)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -523,7 +535,7 @@ void Api::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void Api::MergeFrom(const Api& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Api)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
methods_.MergeFrom(from.methods_);
@@ -611,16 +623,25 @@ Method::Method(const Method& from)
options_(from.options_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
}
request_type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ request_type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_request_type_url().empty()) {
request_type_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_request_type_url(),
GetArenaForAllocation());
}
response_type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ response_type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_response_type_url().empty()) {
response_type_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_response_type_url(),
GetArenaForAllocation());
@@ -633,8 +654,17 @@ Method::Method(const Method& from)
inline void Method::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
request_type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ request_type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
response_type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ response_type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&request_streaming_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&syntax_) -
@@ -667,7 +697,7 @@ void Method::SetCachedSize(int size) const {
void Method::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Method)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -684,12 +714,12 @@ void Method::Clear() {
const char* Method::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// string name = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Method.name"));
@@ -699,7 +729,7 @@ const char* Method::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int
continue;
// string request_type_url = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
auto str = _internal_mutable_request_type_url();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Method.request_type_url"));
@@ -709,7 +739,7 @@ const char* Method::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int
continue;
// bool request_streaming = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
request_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
@@ -717,7 +747,7 @@ const char* Method::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int
continue;
// string response_type_url = 4;
case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
auto str = _internal_mutable_response_type_url();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Method.response_type_url"));
@@ -727,7 +757,7 @@ const char* Method::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int
continue;
// bool response_streaming = 5;
case 5:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
response_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
@@ -735,7 +765,7 @@ const char* Method::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int
continue;
// repeated .google.protobuf.Option options = 6;
case 6:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
ptr -= 1;
do {
ptr += 1;
@@ -748,8 +778,8 @@ const char* Method::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int
continue;
// .google.protobuf.Syntax syntax = 7;
case 7:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
- ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
+ uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
_internal_set_syntax(static_cast<::PROTOBUF_NAMESPACE_ID::Syntax>(val));
} else
@@ -778,10 +808,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* Method::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* Method::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Method)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// string name = 1;
@@ -853,7 +883,7 @@ size_t Method::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Method)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -920,7 +950,7 @@ void Method::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void Method::MergeFrom(const Method& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Method)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
options_.MergeFrom(from.options_);
@@ -1010,11 +1040,17 @@ Mixin::Mixin(const Mixin& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
}
root_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ root_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_root().empty()) {
root_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_root(),
GetArenaForAllocation());
@@ -1024,7 +1060,13 @@ Mixin::Mixin(const Mixin& from)
inline void Mixin::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
root_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ root_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
Mixin::~Mixin() {
@@ -1052,7 +1094,7 @@ void Mixin::SetCachedSize(int size) const {
void Mixin::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Mixin)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1064,12 +1106,12 @@ void Mixin::Clear() {
const char* Mixin::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// string name = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Mixin.name"));
@@ -1079,7 +1121,7 @@ const char* Mixin::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
continue;
// string root = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
auto str = _internal_mutable_root();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Mixin.root"));
@@ -1110,10 +1152,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* Mixin::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* Mixin::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Mixin)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// string name = 1;
@@ -1148,7 +1190,7 @@ size_t Mixin::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Mixin)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1185,7 +1227,7 @@ void Mixin::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void Mixin::MergeFrom(const Mixin& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Mixin)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_name().empty()) {
diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h
index 01c670b2b..4ed460e68 100644
--- a/src/google/protobuf/api.pb.h
+++ b/src/google/protobuf/api.pb.h
@@ -52,7 +52,7 @@ struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fapi_2eproto {
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
- static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
+ static const uint32_t offsets[];
};
PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fapi_2eproto;
PROTOBUF_NAMESPACE_OPEN
@@ -168,8 +168,8 @@ class PROTOBUF_EXPORT Api final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -428,8 +428,8 @@ class PROTOBUF_EXPORT Method final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -666,8 +666,8 @@ class PROTOBUF_EXPORT Mixin final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -794,6 +794,11 @@ inline void Api::set_allocated_name(std::string* name) {
}
name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Api.name)
}
@@ -917,6 +922,11 @@ inline void Api::set_allocated_version(std::string* version) {
}
version_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), version,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (version_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Api.version)
}
@@ -1113,6 +1123,11 @@ inline void Method::set_allocated_name(std::string* name) {
}
name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.name)
}
@@ -1159,6 +1174,11 @@ inline void Method::set_allocated_request_type_url(std::string* request_type_url
}
request_type_url_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), request_type_url,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (request_type_url_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ request_type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.request_type_url)
}
@@ -1225,6 +1245,11 @@ inline void Method::set_allocated_response_type_url(std::string* response_type_u
}
response_type_url_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), response_type_url,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (response_type_url_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ response_type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.response_type_url)
}
@@ -1352,6 +1377,11 @@ inline void Mixin::set_allocated_name(std::string* name) {
}
name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Mixin.name)
}
@@ -1398,6 +1428,11 @@ inline void Mixin::set_allocated_root(std::string* root) {
}
root_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), root,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (root_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ root_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Mixin.root)
}
diff --git a/src/google/protobuf/arena.h b/src/google/protobuf/arena.h
index 8b1a6b577..f6d873be6 100644
--- a/src/google/protobuf/arena.h
+++ b/src/google/protobuf/arena.h
@@ -414,6 +414,16 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final {
p, std::is_convertible<T*, MessageLite*>());
}
+ // Creates message-owned arena.
+ static Arena* CreateMessageOwnedArena() {
+ return new Arena(internal::MessageOwned{});
+ }
+
+ // Checks whether the given arena is message-owned.
+ static bool IsMessageOwnedArena(Arena* arena) {
+ return arena->IsMessageOwned();
+ }
+
private:
static Arena* GetArenaForAllocationInternal(
const T* p, std::true_type /*is_derived_from<MessageLite>*/) {
@@ -521,6 +531,14 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final {
template <typename T>
struct has_get_arena : InternalHelper<T>::has_get_arena {};
+ // Constructor solely used by message-owned arena.
+ inline Arena(internal::MessageOwned) : impl_(internal::MessageOwned{}) {}
+
+ // Checks whether this arena is message-owned.
+ PROTOBUF_ALWAYS_INLINE bool IsMessageOwned() const {
+ return impl_.IsMessageOwned();
+ }
+
template <typename T, typename... Args>
PROTOBUF_NDEBUG_INLINE static T* CreateMessageInternal(Arena* arena,
Args&&... args) {
diff --git a/src/google/protobuf/arena_impl.h b/src/google/protobuf/arena_impl.h
index b47bad78c..d7e69c117 100644
--- a/src/google/protobuf/arena_impl.h
+++ b/src/google/protobuf/arena_impl.h
@@ -255,6 +255,13 @@ class PROTOBUF_EXPORT SerialArena {
static constexpr size_t kCleanupSize = AlignUpTo8(sizeof(CleanupNode));
};
+// Tag type used to invoke the constructor of message-owned arena.
+// Only message-owned arenas use this constructor for creation.
+// Such constructors are internal implementation details of the library.
+struct MessageOwned {
+ explicit MessageOwned() = default;
+};
+
// This class provides the core Arena memory allocation library. Different
// implementations only need to implement the public interface below.
// Arena is not a template type as that would only be useful if all protos
@@ -265,6 +272,11 @@ class PROTOBUF_EXPORT ThreadSafeArena {
public:
ThreadSafeArena() { Init(false); }
+ // Constructor solely used by message-owned arena.
+ ThreadSafeArena(internal::MessageOwned) : alloc_policy_(kMessageOwnedArena) {
+ Init(false);
+ }
+
ThreadSafeArena(char* mem, size_t size) { InitializeFrom(mem, size); }
explicit ThreadSafeArena(void* mem, size_t size,
@@ -320,6 +332,11 @@ class PROTOBUF_EXPORT ThreadSafeArena {
// Add object pointer and cleanup function pointer to the list.
void AddCleanup(void* elem, void (*cleanup)(void*));
+ // Checks whether this arena is message-owned.
+ PROTOBUF_ALWAYS_INLINE bool IsMessageOwned() const {
+ return alloc_policy_ & kMessageOwnedArena;
+ }
+
private:
// Unique for each arena. Changes on Reset().
uint64_t tag_and_id_;
@@ -328,7 +345,11 @@ class PROTOBUF_EXPORT ThreadSafeArena {
intptr_t alloc_policy_ = 0; // Tagged pointer to AllocPolicy.
// The LSB of alloc_policy_ indicates if the user owns the initial block.
- enum { kUserOwnedInitialBlock = 1 };
+ // The second LSB of alloc_policy_ indicates if the arena is message-owned.
+ enum {
+ kUserOwnedInitialBlock = 1,
+ kMessageOwnedArena = 2,
+ };
// Pointer to a linked list of SerialArena.
std::atomic<SerialArena*> threads_;
diff --git a/src/google/protobuf/arena_unittest.cc b/src/google/protobuf/arena_unittest.cc
index ba00fbdb6..76d9126ac 100644
--- a/src/google/protobuf/arena_unittest.cc
+++ b/src/google/protobuf/arena_unittest.cc
@@ -759,6 +759,7 @@ TEST(ArenaTest, AddAllocatedWithReflection) {
}
TEST(ArenaTest, RepeatedPtrFieldAddClearedTest) {
+#ifndef PROTOBUF_FUTURE_BREAKING_CHANGES
{
RepeatedPtrField<TestAllTypes> repeated_field;
EXPECT_TRUE(repeated_field.empty());
@@ -769,6 +770,7 @@ TEST(ArenaTest, RepeatedPtrFieldAddClearedTest) {
EXPECT_TRUE(repeated_field.empty());
EXPECT_EQ(0, repeated_field.size());
}
+#endif // !PROTOBUF_FUTURE_BREAKING_CHANGES
{
RepeatedPtrField<TestAllTypes> repeated_field;
EXPECT_TRUE(repeated_field.empty());
diff --git a/src/google/protobuf/compiler/annotation_test_util.h b/src/google/protobuf/compiler/annotation_test_util.h
index fa87c6cc8..551f2244c 100644
--- a/src/google/protobuf/compiler/annotation_test_util.h
+++ b/src/google/protobuf/compiler/annotation_test_util.h
@@ -78,7 +78,7 @@ bool RunProtoCompiler(const std::string& filename,
bool DecodeMetadata(const std::string& path, GeneratedCodeInfo* info);
// Finds all of the Annotations for a given source file and path.
-// See Location.path in http://google3/net/proto2/proto/descriptor.proto for
+// See Location.path in https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/descriptor.proto for
// explanation of what path vector is.
void FindAnnotationsOnPath(
const GeneratedCodeInfo& info, const std::string& source_file,
@@ -88,7 +88,7 @@ void FindAnnotationsOnPath(
// Finds the Annotation for a given source file and path (or returns null if it
// couldn't). If there are several annotations for given path, returns the first
// one. See Location.path in
-// http://google3/net/proto2/proto/descriptor.proto for explanation of what path
+// https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/descriptor.proto for explanation of what path
// vector is.
const GeneratedCodeInfo::Annotation* FindAnnotationOnPath(
const GeneratedCodeInfo& info, const std::string& source_file,
diff --git a/src/google/protobuf/compiler/cpp/cpp_extension.cc b/src/google/protobuf/compiler/cpp/cpp_extension.cc
index 670c37f5b..647528552 100644
--- a/src/google/protobuf/compiler/cpp/cpp_extension.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_extension.cc
@@ -44,18 +44,6 @@ namespace protobuf {
namespace compiler {
namespace cpp {
-namespace {
-
-// Returns the fully-qualified class name of the message that this field
-// extends. This function is used in the Google-internal code to handle some
-// legacy cases.
-std::string ExtendeeClassName(const FieldDescriptor* descriptor) {
- const Descriptor* extendee = descriptor->containing_type();
- return ClassName(extendee, true);
-}
-
-} // anonymous namespace
-
ExtensionGenerator::ExtensionGenerator(const FieldDescriptor* descriptor,
const Options& options,
MessageSCCAnalyzer* scc_analyzer)
@@ -88,7 +76,8 @@ ExtensionGenerator::ExtensionGenerator(const FieldDescriptor* descriptor,
break;
}
SetCommonVars(options, &variables_);
- variables_["extendee"] = ExtendeeClassName(descriptor_);
+ variables_["extendee"] =
+ QualifiedClassName(descriptor_->containing_type(), options_);
variables_["type_traits"] = type_traits_;
std::string name = descriptor_->name();
variables_["name"] = ResolveKeyword(name);
diff --git a/src/google/protobuf/compiler/cpp/cpp_file.cc b/src/google/protobuf/compiler/cpp/cpp_file.cc
index 3de72941f..878ff78f7 100644
--- a/src/google/protobuf/compiler/cpp/cpp_file.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_file.cc
@@ -1178,7 +1178,8 @@ void FileGenerator::GenerateLibraryIncludes(io::Printer* printer) {
IncludeFile("net/proto2/io/public/coded_stream.h", printer);
IncludeFile("net/proto2/public/arena.h", printer);
IncludeFile("net/proto2/public/arenastring.h", printer);
- if (options_.force_inline_string || options_.profile_driven_inline_string) {
+ if ((options_.force_inline_string || options_.profile_driven_inline_string) &&
+ !options_.opensource_runtime) {
IncludeFile("net/proto2/public/inlined_string_field.h", printer);
}
if (HasSimpleBaseClasses(file_, options_)) {
diff --git a/src/google/protobuf/compiler/cpp/cpp_helpers.cc b/src/google/protobuf/compiler/cpp/cpp_helpers.cc
index d4d6a589c..4459e5012 100644
--- a/src/google/protobuf/compiler/cpp/cpp_helpers.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_helpers.cc
@@ -58,6 +58,7 @@
#include <google/protobuf/stubs/substitute.h>
#include <google/protobuf/stubs/hash.h>
+// Must be last.
#include <google/protobuf/port_def.inc>
namespace google {
@@ -170,11 +171,7 @@ static std::unordered_set<std::string>* MakeKeywordsMap() {
static std::unordered_set<std::string>& kKeywords = *MakeKeywordsMap();
std::string IntTypeName(const Options& options, const std::string& type) {
- if (options.opensource_runtime) {
- return "::PROTOBUF_NAMESPACE_ID::" + type;
- } else {
- return "::" + type;
- }
+ return type + "_t";
}
void SetIntVar(const Options& options, const std::string& type,
@@ -456,6 +453,19 @@ std::string FieldName(const FieldDescriptor* field) {
return result;
}
+std::string OneofCaseConstantName(const FieldDescriptor* field) {
+ GOOGLE_DCHECK(field->containing_oneof());
+ std::string field_name = UnderscoresToCamelCase(field->name(), true);
+ return "k" + field_name;
+}
+
+std::string QualifiedOneofCaseConstantName(const FieldDescriptor* field) {
+ GOOGLE_DCHECK(field->containing_oneof());
+ const std::string qualification =
+ QualifiedClassName(field->containing_type());
+ return StrCat(qualification, "::", OneofCaseConstantName(field));
+}
+
std::string EnumValueName(const EnumValueDescriptor* enum_value) {
std::string result = enum_value->name();
if (kKeywords.count(result) > 0) {
@@ -522,13 +532,13 @@ std::string StripProto(const std::string& filename) {
const char* PrimitiveTypeName(FieldDescriptor::CppType type) {
switch (type) {
case FieldDescriptor::CPPTYPE_INT32:
- return "::google::protobuf::int32";
+ return "int32_t";
case FieldDescriptor::CPPTYPE_INT64:
- return "::google::protobuf::int64";
+ return "int64_t";
case FieldDescriptor::CPPTYPE_UINT32:
- return "::google::protobuf::uint32";
+ return "uint32_t";
case FieldDescriptor::CPPTYPE_UINT64:
- return "::google::protobuf::uint64";
+ return "uint64_t";
case FieldDescriptor::CPPTYPE_DOUBLE:
return "double";
case FieldDescriptor::CPPTYPE_FLOAT:
diff --git a/src/google/protobuf/compiler/cpp/cpp_message.cc b/src/google/protobuf/compiler/cpp/cpp_message.cc
index d4c020b4a..7dc7e89af 100644
--- a/src/google/protobuf/compiler/cpp/cpp_message.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_message.cc
@@ -1437,7 +1437,8 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
if (EnableMessageOwnedArena(descriptor_)) {
format(
"inline $classname$() : $classname$("
- "new ::$proto_ns$::Arena(), true) {}\n");
+ "::$proto_ns$::Arena::InternalHelper<$classname$>::\n"
+ " CreateMessageOwnedArena(), true) {}\n");
} else {
format("inline $classname$() : $classname$(nullptr) {}\n");
}
@@ -1530,10 +1531,8 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
format("enum $1$Case {\n", UnderscoresToCamelCase(oneof->name(), true));
format.Indent();
for (auto field : FieldRange(oneof)) {
- std::string oneof_enum_case_field_name =
- UnderscoresToCamelCase(field->name(), true);
- format("k$1$ = $2$,\n", oneof_enum_case_field_name, // 1
- field->number()); // 2
+ format("$1$ = $2$,\n", OneofCaseConstantName(field), // 1
+ field->number()); // 2
}
format("$1$_NOT_SET = 0,\n", ToUpper(oneof->name()));
format.Outdent();
diff --git a/src/google/protobuf/compiler/cpp/cpp_names.h b/src/google/protobuf/compiler/cpp/cpp_names.h
index cbc69a7cb..6bcbff061 100644
--- a/src/google/protobuf/compiler/cpp/cpp_names.h
+++ b/src/google/protobuf/compiler/cpp/cpp_names.h
@@ -73,6 +73,12 @@ std::string QualifiedExtensionName(const FieldDescriptor* d);
// anyway, so normally this just returns field->name().
std::string FieldName(const FieldDescriptor* field);
+// Requires that this field is in a oneof. Returns the (unqualified) case
+// constant for this field.
+std::string OneofCaseConstantName(const FieldDescriptor* field);
+// Returns the quafilied case constant for this field.
+std::string QualifiedOneofCaseConstantName(const FieldDescriptor* field);
+
// Get the (unqualified) name that should be used for this enum value in C++
// code.
std::string EnumValueName(const EnumValueDescriptor* enum_value);
diff --git a/src/google/protobuf/compiler/cpp/cpp_string_field.cc b/src/google/protobuf/compiler/cpp/cpp_string_field.cc
index be19310df..93aff5d7e 100644
--- a/src/google/protobuf/compiler/cpp/cpp_string_field.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_string_field.cc
@@ -292,6 +292,14 @@ void StringFieldGenerator::GenerateInlineAccessorDefinitions(
format(
" return $name$_.ReleaseNonDefault($init_value$, "
"GetArenaForAllocation());\n");
+ if (descriptor_->default_value_string().empty()) {
+ format(
+ "#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING\n"
+ " if ($name$_.IsDefault($init_value$)) {\n"
+ " $name$_.Set($init_value$, \"\", GetArenaForAllocation());\n"
+ " }\n"
+ "#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING\n");
+ }
} else {
format(
" return $name$_.Release(nullptr, GetArenaForAllocation(), "
@@ -314,6 +322,14 @@ void StringFieldGenerator::GenerateInlineAccessorDefinitions(
format(
" $name$_.SetAllocated($init_value$, $name$,\n"
" GetArenaForAllocation());\n");
+ if (descriptor_->default_value_string().empty()) {
+ format(
+ "#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING\n"
+ " if ($name$_.IsDefault($init_value$)) {\n"
+ " $name$_.Set($init_value$, \"\", GetArenaForAllocation());\n"
+ " }\n"
+ "#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING\n");
+ }
} else {
// Currently, string fields with default value can't be inlined.
format(
@@ -422,6 +438,13 @@ void StringFieldGenerator::GenerateConstructorCode(io::Printer* printer) const {
}
GOOGLE_DCHECK(!inlined_);
format("$name$_.UnsafeSetDefault($init_value$);\n");
+ if (IsString(descriptor_, options_) &&
+ descriptor_->default_value_string().empty()) {
+ format(
+ "#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING\n"
+ " $name$_.Set($init_value$, \"\", GetArenaForAllocation());\n"
+ "#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING\n");
+ }
}
void StringFieldGenerator::GenerateCopyConstructorCode(
diff --git a/src/google/protobuf/compiler/java/java_doc_comment.cc b/src/google/protobuf/compiler/java/java_doc_comment.cc
index 2376488f0..80b79025d 100644
--- a/src/google/protobuf/compiler/java/java_doc_comment.cc
+++ b/src/google/protobuf/compiler/java/java_doc_comment.cc
@@ -36,6 +36,7 @@
#include <vector>
+#include <google/protobuf/descriptor.pb.h>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/stubs/strutil.h>
@@ -186,6 +187,21 @@ void WriteFieldDocComment(io::Printer* printer, const FieldDescriptor* field) {
printer->Print(" */\n");
}
+void WriteDeprecatedJavadoc(io::Printer* printer, const FieldDescriptor* field,
+ const FieldAccessorType type) {
+ if (!field->options().deprecated()) {
+ return;
+ }
+
+ // Lite codegen does not annotate set & clear methods with @Deprecated.
+ if (field->file()->options().optimize_for() == FileOptions::LITE_RUNTIME &&
+ (type == SETTER || type == CLEARER)) {
+ return;
+ }
+
+ printer->Print(" * @deprecated\n");
+}
+
void WriteFieldAccessorDocComment(io::Printer* printer,
const FieldDescriptor* field,
const FieldAccessorType type,
@@ -194,6 +210,7 @@ void WriteFieldAccessorDocComment(io::Printer* printer,
WriteDocCommentBody(printer, field);
printer->Print(" * <code>$def$</code>\n", "def",
EscapeJavadoc(FirstLineOf(field->DebugString())));
+ WriteDeprecatedJavadoc(printer, field, type);
switch (type) {
case HAZZER:
printer->Print(" * @return Whether the $name$ field is set.\n", "name",
@@ -252,6 +269,7 @@ void WriteFieldEnumValueAccessorDocComment(io::Printer* printer,
WriteDocCommentBody(printer, field);
printer->Print(" * <code>$def$</code>\n", "def",
EscapeJavadoc(FirstLineOf(field->DebugString())));
+ WriteDeprecatedJavadoc(printer, field, type);
switch (type) {
case HAZZER:
// Should never happen
@@ -321,6 +339,7 @@ void WriteFieldStringBytesAccessorDocComment(io::Printer* printer,
WriteDocCommentBody(printer, field);
printer->Print(" * <code>$def$</code>\n", "def",
EscapeJavadoc(FirstLineOf(field->DebugString())));
+ WriteDeprecatedJavadoc(printer, field, type);
switch (type) {
case HAZZER:
// Should never happen
diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc
index f4c1a1f8b..c4849ad0f 100644
--- a/src/google/protobuf/compiler/plugin.pb.cc
+++ b/src/google/protobuf/compiler/plugin.pb.cc
@@ -83,7 +83,7 @@ static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto = nullptr;
-const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
+const uint32_t TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, _has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, _internal_metadata_),
~0u, // no _extensions_
@@ -248,6 +248,9 @@ Version::Version(const Version& from)
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
suffix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ suffix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_suffix()) {
suffix_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_suffix(),
GetArenaForAllocation());
@@ -260,6 +263,9 @@ Version::Version(const Version& from)
inline void Version::SharedCtor() {
suffix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ suffix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&major_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&patch_) -
@@ -290,7 +296,7 @@ void Version::SetCachedSize(int size) const {
void Version::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.Version)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -311,12 +317,12 @@ const char* Version::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::in
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional int32 major = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_major(&has_bits);
major_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
@@ -325,7 +331,7 @@ const char* Version::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::in
continue;
// optional int32 minor = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_minor(&has_bits);
minor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
@@ -334,7 +340,7 @@ const char* Version::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::in
continue;
// optional int32 patch = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_patch(&has_bits);
patch_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
@@ -343,7 +349,7 @@ const char* Version::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::in
continue;
// optional string suffix = 4;
case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
auto str = _internal_mutable_suffix();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -377,10 +383,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* Version::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* Version::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.Version)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -424,7 +430,7 @@ size_t Version::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.Version)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -472,7 +478,7 @@ void Version::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void Version::MergeFrom(const Version& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.Version)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
@@ -569,6 +575,9 @@ CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from)
proto_file_(from.proto_file_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
parameter_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ parameter_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_parameter()) {
parameter_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_parameter(),
GetArenaForAllocation());
@@ -583,6 +592,9 @@ CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from)
inline void CodeGeneratorRequest::SharedCtor() {
parameter_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ parameter_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
compiler_version_ = nullptr;
}
@@ -611,7 +623,7 @@ void CodeGeneratorRequest::SetCachedSize(int size) const {
void CodeGeneratorRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorRequest)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -635,12 +647,12 @@ const char* CodeGeneratorRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAM
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated string file_to_generate = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr -= 1;
do {
ptr += 1;
@@ -657,7 +669,7 @@ const char* CodeGeneratorRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAM
continue;
// optional string parameter = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
auto str = _internal_mutable_parameter();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -669,7 +681,7 @@ const char* CodeGeneratorRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAM
continue;
// optional .google.protobuf.compiler.Version compiler_version = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr = ctx->ParseMessage(_internal_mutable_compiler_version(), ptr);
CHK_(ptr);
} else
@@ -677,7 +689,7 @@ const char* CodeGeneratorRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAM
continue;
// repeated .google.protobuf.FileDescriptorProto proto_file = 15;
case 15:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 122)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 122)) {
ptr -= 1;
do {
ptr += 1;
@@ -712,10 +724,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* CodeGeneratorRequest::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* CodeGeneratorRequest::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorRequest)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated string file_to_generate = 1;
@@ -767,7 +779,7 @@ size_t CodeGeneratorRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorRequest)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -822,7 +834,7 @@ void CodeGeneratorRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void CodeGeneratorRequest::MergeFrom(const CodeGeneratorRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorRequest)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
file_to_generate_.MergeFrom(from.file_to_generate_);
@@ -915,16 +927,25 @@ CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorRespon
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
}
insertion_point_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ insertion_point_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_insertion_point()) {
insertion_point_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_insertion_point(),
GetArenaForAllocation());
}
content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_content()) {
content_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_content(),
GetArenaForAllocation());
@@ -939,8 +960,17 @@ CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorRespon
inline void CodeGeneratorResponse_File::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
insertion_point_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ insertion_point_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
generated_code_info_ = nullptr;
}
@@ -971,7 +1001,7 @@ void CodeGeneratorResponse_File::SetCachedSize(int size) const {
void CodeGeneratorResponse_File::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorResponse.File)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -999,12 +1029,12 @@ const char* CodeGeneratorResponse_File::_InternalParse(const char* ptr, ::PROTOB
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string name = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -1016,7 +1046,7 @@ const char* CodeGeneratorResponse_File::_InternalParse(const char* ptr, ::PROTOB
continue;
// optional string insertion_point = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
auto str = _internal_mutable_insertion_point();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -1028,7 +1058,7 @@ const char* CodeGeneratorResponse_File::_InternalParse(const char* ptr, ::PROTOB
continue;
// optional string content = 15;
case 15:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 122)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 122)) {
auto str = _internal_mutable_content();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -1040,7 +1070,7 @@ const char* CodeGeneratorResponse_File::_InternalParse(const char* ptr, ::PROTOB
continue;
// optional .google.protobuf.GeneratedCodeInfo generated_code_info = 16;
case 16:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 130)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 130)) {
ptr = ctx->ParseMessage(_internal_mutable_generated_code_info(), ptr);
CHK_(ptr);
} else
@@ -1070,10 +1100,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* CodeGeneratorResponse_File::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* CodeGeneratorResponse_File::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse.File)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -1127,7 +1157,7 @@ size_t CodeGeneratorResponse_File::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorResponse.File)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1181,7 +1211,7 @@ void CodeGeneratorResponse_File::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void CodeGeneratorResponse_File::MergeFrom(const CodeGeneratorResponse_File& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse.File)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
@@ -1272,6 +1302,9 @@ CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from)
file_(from.file_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
error_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ error_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_error()) {
error_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_error(),
GetArenaForAllocation());
@@ -1282,6 +1315,9 @@ CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from)
inline void CodeGeneratorResponse::SharedCtor() {
error_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ error_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
supported_features_ = uint64_t{0u};
}
@@ -1309,7 +1345,7 @@ void CodeGeneratorResponse::SetCachedSize(int size) const {
void CodeGeneratorResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorResponse)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1327,12 +1363,12 @@ const char* CodeGeneratorResponse::_InternalParse(const char* ptr, ::PROTOBUF_NA
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string error = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_error();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -1344,7 +1380,7 @@ const char* CodeGeneratorResponse::_InternalParse(const char* ptr, ::PROTOBUF_NA
continue;
// optional uint64 supported_features = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_supported_features(&has_bits);
supported_features_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -1353,7 +1389,7 @@ const char* CodeGeneratorResponse::_InternalParse(const char* ptr, ::PROTOBUF_NA
continue;
// repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
case 15:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 122)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 122)) {
ptr -= 1;
do {
ptr += 1;
@@ -1388,10 +1424,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* CodeGeneratorResponse::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* CodeGeneratorResponse::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -1431,7 +1467,7 @@ size_t CodeGeneratorResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorResponse)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1476,7 +1512,7 @@ void CodeGeneratorResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void CodeGeneratorResponse::MergeFrom(const CodeGeneratorResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
file_.MergeFrom(from.file_);
diff --git a/src/google/protobuf/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h
index 39c488408..5ed6e55e0 100644
--- a/src/google/protobuf/compiler/plugin.pb.h
+++ b/src/google/protobuf/compiler/plugin.pb.h
@@ -58,7 +58,7 @@ struct PROTOC_EXPORT TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto {
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
- static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
+ static const uint32_t offsets[];
};
PROTOC_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto;
PROTOBUF_NAMESPACE_OPEN
@@ -211,8 +211,8 @@ class PROTOC_EXPORT Version final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -271,11 +271,11 @@ class PROTOC_EXPORT Version final :
bool _internal_has_major() const;
public:
void clear_major();
- ::PROTOBUF_NAMESPACE_ID::int32 major() const;
- void set_major(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t major() const;
+ void set_major(int32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_major() const;
- void _internal_set_major(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t _internal_major() const;
+ void _internal_set_major(int32_t value);
public:
// optional int32 minor = 2;
@@ -284,11 +284,11 @@ class PROTOC_EXPORT Version final :
bool _internal_has_minor() const;
public:
void clear_minor();
- ::PROTOBUF_NAMESPACE_ID::int32 minor() const;
- void set_minor(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t minor() const;
+ void set_minor(int32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_minor() const;
- void _internal_set_minor(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t _internal_minor() const;
+ void _internal_set_minor(int32_t value);
public:
// optional int32 patch = 3;
@@ -297,11 +297,11 @@ class PROTOC_EXPORT Version final :
bool _internal_has_patch() const;
public:
void clear_patch();
- ::PROTOBUF_NAMESPACE_ID::int32 patch() const;
- void set_patch(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t patch() const;
+ void set_patch(int32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_patch() const;
- void _internal_set_patch(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t _internal_patch() const;
+ void _internal_set_patch(int32_t value);
public:
// @@protoc_insertion_point(class_scope:google.protobuf.compiler.Version)
@@ -314,9 +314,9 @@ class PROTOC_EXPORT Version final :
::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr suffix_;
- ::PROTOBUF_NAMESPACE_ID::int32 major_;
- ::PROTOBUF_NAMESPACE_ID::int32 minor_;
- ::PROTOBUF_NAMESPACE_ID::int32 patch_;
+ int32_t major_;
+ int32_t minor_;
+ int32_t patch_;
friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto;
};
// -------------------------------------------------------------------
@@ -421,8 +421,8 @@ class PROTOC_EXPORT CodeGeneratorRequest final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -652,8 +652,8 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -877,8 +877,8 @@ class PROTOC_EXPORT CodeGeneratorResponse final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -986,11 +986,11 @@ class PROTOC_EXPORT CodeGeneratorResponse final :
bool _internal_has_supported_features() const;
public:
void clear_supported_features();
- ::PROTOBUF_NAMESPACE_ID::uint64 supported_features() const;
- void set_supported_features(::PROTOBUF_NAMESPACE_ID::uint64 value);
+ uint64_t supported_features() const;
+ void set_supported_features(uint64_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::uint64 _internal_supported_features() const;
- void _internal_set_supported_features(::PROTOBUF_NAMESPACE_ID::uint64 value);
+ uint64_t _internal_supported_features() const;
+ void _internal_set_supported_features(uint64_t value);
public:
// @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorResponse)
@@ -1004,7 +1004,7 @@ class PROTOC_EXPORT CodeGeneratorResponse final :
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File > file_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr error_;
- ::PROTOBUF_NAMESPACE_ID::uint64 supported_features_;
+ uint64_t supported_features_;
friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto;
};
// ===================================================================
@@ -1030,18 +1030,18 @@ inline void Version::clear_major() {
major_ = 0;
_has_bits_[0] &= ~0x00000002u;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Version::_internal_major() const {
+inline int32_t Version::_internal_major() const {
return major_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Version::major() const {
+inline int32_t Version::major() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.major)
return _internal_major();
}
-inline void Version::_internal_set_major(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Version::_internal_set_major(int32_t value) {
_has_bits_[0] |= 0x00000002u;
major_ = value;
}
-inline void Version::set_major(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Version::set_major(int32_t value) {
_internal_set_major(value);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.major)
}
@@ -1058,18 +1058,18 @@ inline void Version::clear_minor() {
minor_ = 0;
_has_bits_[0] &= ~0x00000004u;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Version::_internal_minor() const {
+inline int32_t Version::_internal_minor() const {
return minor_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Version::minor() const {
+inline int32_t Version::minor() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.minor)
return _internal_minor();
}
-inline void Version::_internal_set_minor(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Version::_internal_set_minor(int32_t value) {
_has_bits_[0] |= 0x00000004u;
minor_ = value;
}
-inline void Version::set_minor(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Version::set_minor(int32_t value) {
_internal_set_minor(value);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.minor)
}
@@ -1086,18 +1086,18 @@ inline void Version::clear_patch() {
patch_ = 0;
_has_bits_[0] &= ~0x00000008u;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Version::_internal_patch() const {
+inline int32_t Version::_internal_patch() const {
return patch_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Version::patch() const {
+inline int32_t Version::patch() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.patch)
return _internal_patch();
}
-inline void Version::_internal_set_patch(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Version::_internal_set_patch(int32_t value) {
_has_bits_[0] |= 0x00000008u;
patch_ = value;
}
-inline void Version::set_patch(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Version::set_patch(int32_t value) {
_internal_set_patch(value);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.patch)
}
@@ -1148,6 +1148,11 @@ inline std::string* Version::release_suffix() {
}
_has_bits_[0] &= ~0x00000001u;
return suffix_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (suffix_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ suffix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void Version::set_allocated_suffix(std::string* suffix) {
if (suffix != nullptr) {
@@ -1157,6 +1162,11 @@ inline void Version::set_allocated_suffix(std::string* suffix) {
}
suffix_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), suffix,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (suffix_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ suffix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.Version.suffix)
}
@@ -1285,6 +1295,11 @@ inline std::string* CodeGeneratorRequest::release_parameter() {
}
_has_bits_[0] &= ~0x00000001u;
return parameter_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (parameter_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ parameter_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void CodeGeneratorRequest::set_allocated_parameter(std::string* parameter) {
if (parameter != nullptr) {
@@ -1294,6 +1309,11 @@ inline void CodeGeneratorRequest::set_allocated_parameter(std::string* parameter
}
parameter_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), parameter,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (parameter_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ parameter_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorRequest.parameter)
}
@@ -1474,6 +1494,11 @@ inline std::string* CodeGeneratorResponse_File::release_name() {
}
_has_bits_[0] &= ~0x00000001u;
return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void CodeGeneratorResponse_File::set_allocated_name(std::string* name) {
if (name != nullptr) {
@@ -1483,6 +1508,11 @@ inline void CodeGeneratorResponse_File::set_allocated_name(std::string* name) {
}
name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.name)
}
@@ -1532,6 +1562,11 @@ inline std::string* CodeGeneratorResponse_File::release_insertion_point() {
}
_has_bits_[0] &= ~0x00000002u;
return insertion_point_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (insertion_point_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ insertion_point_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void CodeGeneratorResponse_File::set_allocated_insertion_point(std::string* insertion_point) {
if (insertion_point != nullptr) {
@@ -1541,6 +1576,11 @@ inline void CodeGeneratorResponse_File::set_allocated_insertion_point(std::strin
}
insertion_point_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), insertion_point,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (insertion_point_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ insertion_point_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
}
@@ -1590,6 +1630,11 @@ inline std::string* CodeGeneratorResponse_File::release_content() {
}
_has_bits_[0] &= ~0x00000004u;
return content_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (content_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void CodeGeneratorResponse_File::set_allocated_content(std::string* content) {
if (content != nullptr) {
@@ -1599,6 +1644,11 @@ inline void CodeGeneratorResponse_File::set_allocated_content(std::string* conte
}
content_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), content,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (content_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.content)
}
@@ -1740,6 +1790,11 @@ inline std::string* CodeGeneratorResponse::release_error() {
}
_has_bits_[0] &= ~0x00000001u;
return error_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (error_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ error_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void CodeGeneratorResponse::set_allocated_error(std::string* error) {
if (error != nullptr) {
@@ -1749,6 +1804,11 @@ inline void CodeGeneratorResponse::set_allocated_error(std::string* error) {
}
error_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), error,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (error_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ error_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.error)
}
@@ -1764,18 +1824,18 @@ inline void CodeGeneratorResponse::clear_supported_features() {
supported_features_ = uint64_t{0u};
_has_bits_[0] &= ~0x00000002u;
}
-inline ::PROTOBUF_NAMESPACE_ID::uint64 CodeGeneratorResponse::_internal_supported_features() const {
+inline uint64_t CodeGeneratorResponse::_internal_supported_features() const {
return supported_features_;
}
-inline ::PROTOBUF_NAMESPACE_ID::uint64 CodeGeneratorResponse::supported_features() const {
+inline uint64_t CodeGeneratorResponse::supported_features() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.supported_features)
return _internal_supported_features();
}
-inline void CodeGeneratorResponse::_internal_set_supported_features(::PROTOBUF_NAMESPACE_ID::uint64 value) {
+inline void CodeGeneratorResponse::_internal_set_supported_features(uint64_t value) {
_has_bits_[0] |= 0x00000002u;
supported_features_ = value;
}
-inline void CodeGeneratorResponse::set_supported_features(::PROTOBUF_NAMESPACE_ID::uint64 value) {
+inline void CodeGeneratorResponse::set_supported_features(uint64_t value) {
_internal_set_supported_features(value);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.supported_features)
}
diff --git a/src/google/protobuf/compiler/python/python_generator.cc b/src/google/protobuf/compiler/python/python_generator.cc
index 95de716f9..ebe7d7209 100644
--- a/src/google/protobuf/compiler/python/python_generator.cc
+++ b/src/google/protobuf/compiler/python/python_generator.cc
@@ -180,6 +180,8 @@ void PrintTopBoilerplate(io::Printer* printer, const FileDescriptor* file,
}
printer->Print(
"from google.protobuf import descriptor as _descriptor\n"
+ "from google.protobuf import descriptor_pool as "
+ "_descriptor_pool\n"
"from google.protobuf import message as _message\n"
"from google.protobuf import reflection as _reflection\n"
"from google.protobuf import symbol_database as "
@@ -350,12 +352,32 @@ bool Generator::Generate(const FileDescriptor* file,
PrintTopLevelEnums();
PrintTopLevelExtensions();
if (pure_python_workable_) {
- PrintAllNestedEnumsInFile();
- PrintMessageDescriptors();
- FixForeignFieldsInDescriptors();
+ if (GeneratingDescriptorProto()) {
+ printer_->Print("if _descriptor._USE_C_DESCRIPTORS == False:\n");
+ printer_->Indent();
+ // Create enums before message descriptors
+ PrintAllNestedEnumsInFile(StripPrintDescriptor::kCreate);
+ PrintMessageDescriptors(StripPrintDescriptor::kCreate);
+ FixForeignFieldsInDescriptors();
+ printer_->Outdent();
+ printer_->Print("else:\n");
+ printer_->Indent();
+ }
+ // Find the message descriptors first and then use the message
+ // descriptor to find enums.
+ PrintMessageDescriptors(StripPrintDescriptor::kFind);
+ PrintAllNestedEnumsInFile(StripPrintDescriptor::kFind);
+ if (GeneratingDescriptorProto()) {
+ printer_->Outdent();
+ }
}
PrintMessages();
if (pure_python_workable_) {
+ PrintServiceDescriptors();
+
+ printer.Print("if _descriptor._USE_C_DESCRIPTORS == False:\n");
+ printer_->Indent();
+
// We have to fix up the extensions after the message classes themselves,
// since they need to call static RegisterExtension() methods on these
// classes.
@@ -366,7 +388,11 @@ bool Generator::Generate(const FileDescriptor* file,
// custom options that may be unknown when we define the descriptors.
// This does not apply to services because they are not used by extensions.
FixAllDescriptorOptions();
- PrintServiceDescriptors();
+
+ // Set serialized_start and serialized_end.
+ SetSerializedPbInterval();
+
+ printer_->Outdent();
}
if (HasGenericServices(file)) {
PrintServices();
@@ -428,46 +454,65 @@ void Generator::PrintFileDescriptor() const {
m["package"] = file_->package();
m["syntax"] = StringifySyntax(file_->syntax());
m["options"] = OptionsValue(file_->options().SerializeAsString());
- const char file_descriptor_template[] =
- "$descriptor_name$ = _descriptor.FileDescriptor(\n"
- " name='$name$',\n"
- " package='$package$',\n"
- " syntax='$syntax$',\n"
- " serialized_options=$options$,\n"
- " create_key=_descriptor._internal_create_key,\n";
- printer_->Print(m, file_descriptor_template);
- printer_->Indent();
- if (pure_python_workable_) {
- printer_->Print("serialized_pb=b'$value$'\n", "value",
- strings::CHexEscape(file_descriptor_serialized_));
- if (file_->dependency_count() != 0) {
- printer_->Print(",\ndependencies=[");
- for (int i = 0; i < file_->dependency_count(); ++i) {
- std::string module_alias = ModuleAlias(file_->dependency(i)->name());
- printer_->Print("$module_alias$.DESCRIPTOR,", "module_alias",
- module_alias);
+ m["serialized_descriptor"] = strings::CHexEscape(file_descriptor_serialized_);
+ if (GeneratingDescriptorProto()) {
+ printer_->Print("if _descriptor._USE_C_DESCRIPTORS == False:\n");
+ printer_->Indent();
+ // Pure python's AddSerializedFile() depend on the generated
+ // descriptor_pb2.py thus we can not use AddSerializedFile() when
+ // generated descriptor.proto for pure python.
+ const char file_descriptor_template[] =
+ "$descriptor_name$ = _descriptor.FileDescriptor(\n"
+ " name='$name$',\n"
+ " package='$package$',\n"
+ " syntax='$syntax$',\n"
+ " serialized_options=$options$,\n"
+ " create_key=_descriptor._internal_create_key,\n";
+ printer_->Print(m, file_descriptor_template);
+ printer_->Indent();
+ if (pure_python_workable_) {
+ printer_->Print("serialized_pb=b'$value$'\n", "value",
+ strings::CHexEscape(file_descriptor_serialized_));
+ if (file_->dependency_count() != 0) {
+ printer_->Print(",\ndependencies=[");
+ for (int i = 0; i < file_->dependency_count(); ++i) {
+ std::string module_alias = ModuleAlias(file_->dependency(i)->name());
+ printer_->Print("$module_alias$.DESCRIPTOR,", "module_alias",
+ module_alias);
+ }
+ printer_->Print("]");
}
- printer_->Print("]");
- }
- if (file_->public_dependency_count() > 0) {
- printer_->Print(",\npublic_dependencies=[");
- for (int i = 0; i < file_->public_dependency_count(); ++i) {
- std::string module_alias =
- ModuleAlias(file_->public_dependency(i)->name());
- printer_->Print("$module_alias$.DESCRIPTOR,", "module_alias",
- module_alias);
+ if (file_->public_dependency_count() > 0) {
+ printer_->Print(",\npublic_dependencies=[");
+ for (int i = 0; i < file_->public_dependency_count(); ++i) {
+ std::string module_alias =
+ ModuleAlias(file_->public_dependency(i)->name());
+ printer_->Print("$module_alias$.DESCRIPTOR,", "module_alias",
+ module_alias);
+ }
+ printer_->Print("]");
}
- printer_->Print("]");
+ } else {
+ printer_->Print("serialized_pb=''\n");
}
- } else {
- printer_->Print("serialized_pb=''\n");
- }
- // TODO(falk): Also print options and fix the message_type, enum_type,
- // service and extension later in the generation.
+ // TODO(falk): Also print options and fix the message_type, enum_type,
+ // service and extension later in the generation.
- printer_->Outdent();
- printer_->Print(")\n");
+ printer_->Outdent();
+ printer_->Print(")\n");
+
+ printer_->Outdent();
+ printer_->Print("else:\n");
+ printer_->Indent();
+ }
+ printer_->Print(m,
+ "$descriptor_name$ = "
+ "_descriptor_pool.Default().AddSerializedFile(b'$serialized_"
+ "descriptor$')\n");
+ if (GeneratingDescriptorProto()) {
+ printer_->Outdent();
+ }
printer_->Print("\n");
}
@@ -477,7 +522,7 @@ void Generator::PrintTopLevelEnums() const {
std::vector<std::pair<std::string, int> > top_level_enum_values;
for (int i = 0; i < file_->enum_type_count(); ++i) {
const EnumDescriptor& enum_descriptor = *file_->enum_type(i);
- PrintEnum(enum_descriptor);
+ PrintFindEnum(enum_descriptor);
printer_->Print(
"$name$ = "
"enum_type_wrapper.EnumTypeWrapper($descriptor_name$)",
@@ -501,16 +546,17 @@ void Generator::PrintTopLevelEnums() const {
}
// Prints all enums contained in all message types in |file|.
-void Generator::PrintAllNestedEnumsInFile() const {
+void Generator::PrintAllNestedEnumsInFile(
+ StripPrintDescriptor print_mode) const {
for (int i = 0; i < file_->message_type_count(); ++i) {
- PrintNestedEnums(*file_->message_type(i));
+ PrintNestedEnums(*file_->message_type(i), print_mode);
}
}
// Prints a Python statement assigning the appropriate module-level
// enum name to a Python EnumDescriptor object equivalent to
// enum_descriptor.
-void Generator::PrintEnum(const EnumDescriptor& enum_descriptor) const {
+void Generator::PrintCreateEnum(const EnumDescriptor& enum_descriptor) const {
std::map<std::string, std::string> m;
std::string module_level_descriptor_name =
ModuleLevelDescriptorName(enum_descriptor);
@@ -545,7 +591,6 @@ void Generator::PrintEnum(const EnumDescriptor& enum_descriptor) const {
printer_->Print("serialized_options=$options_value$,\n", "options_value",
OptionsValue(options_string));
EnumDescriptorProto edp;
- PrintSerializedPbInterval(enum_descriptor, edp);
printer_->Outdent();
printer_->Print(")\n");
if (pure_python_workable_) {
@@ -555,20 +600,41 @@ void Generator::PrintEnum(const EnumDescriptor& enum_descriptor) const {
printer_->Print("\n");
}
+void Generator::PrintFindEnum(const EnumDescriptor& enum_descriptor) const {
+ std::map<std::string, std::string> m;
+ m["descriptor_name"] = ModuleLevelDescriptorName(enum_descriptor);
+ m["name"] = enum_descriptor.name();
+ m["file"] = kDescriptorKey;
+ if (enum_descriptor.containing_type()) {
+ m["containing_type"] =
+ ModuleLevelDescriptorName(*enum_descriptor.containing_type());
+ printer_->Print(m,
+ "$descriptor_name$ = "
+ "$containing_type$.enum_types_by_name['$name$']\n");
+ } else {
+ printer_->Print(
+ m, "$descriptor_name$ = $file$.enum_types_by_name['$name$']\n");
+ }
+}
+
// Recursively prints enums in nested types within descriptor, then
// prints enums contained at the top level in descriptor.
-void Generator::PrintNestedEnums(const Descriptor& descriptor) const {
+void Generator::PrintNestedEnums(const Descriptor& descriptor,
+ StripPrintDescriptor print_mode) const {
for (int i = 0; i < descriptor.nested_type_count(); ++i) {
- PrintNestedEnums(*descriptor.nested_type(i));
+ PrintNestedEnums(*descriptor.nested_type(i), print_mode);
}
for (int i = 0; i < descriptor.enum_type_count(); ++i) {
- PrintEnum(*descriptor.enum_type(i));
+ if (print_mode == StripPrintDescriptor::kCreate) {
+ PrintCreateEnum(*descriptor.enum_type(i));
+ } else {
+ PrintFindEnum(*descriptor.enum_type(i));
+ }
}
}
void Generator::PrintTopLevelExtensions() const {
- const bool is_extension = true;
for (int i = 0; i < file_->extension_count(); ++i) {
const FieldDescriptor& extension_field = *file_->extension(i);
std::string constant_name = extension_field.name() + "_FIELD_NUMBER";
@@ -576,27 +642,32 @@ void Generator::PrintTopLevelExtensions() const {
printer_->Print("$constant_name$ = $number$\n", "constant_name",
constant_name, "number",
StrCat(extension_field.number()));
- printer_->Print("$name$ = ", "name",
- ResolveKeyword(extension_field.name()));
- PrintFieldDescriptor(extension_field, is_extension);
- printer_->Print("\n");
+ printer_->Print(
+ "$resolved_name$ = "
+ "$file$.extensions_by_name['$name$']\n",
+ "resolved_name", ResolveKeyword(extension_field.name()), "file",
+ kDescriptorKey, "name", extension_field.name());
}
printer_->Print("\n");
}
// Prints Python equivalents of all Descriptors in |file|.
-void Generator::PrintMessageDescriptors() const {
- for (int i = 0; i < file_->message_type_count(); ++i) {
- PrintDescriptor(*file_->message_type(i));
- printer_->Print("\n");
+void Generator::PrintMessageDescriptors(StripPrintDescriptor print_mode) const {
+ if (print_mode == StripPrintDescriptor::kCreate) {
+ for (int i = 0; i < file_->message_type_count(); ++i) {
+ PrintCreateDescriptor(*file_->message_type(i));
+ printer_->Print("\n");
+ }
+ } else {
+ for (int i = 0; i < file_->message_type_count(); ++i) {
+ PrintFindDescriptor(*file_->message_type(i));
+ }
}
}
void Generator::PrintServiceDescriptors() const {
for (int i = 0; i < file_->service_count(); ++i) {
PrintServiceDescriptor(*file_->service(i));
- AddServiceToFileDescriptor(*file_->service(i));
- printer_->Print("\n");
}
}
@@ -610,65 +681,11 @@ void Generator::PrintServices() const {
void Generator::PrintServiceDescriptor(
const ServiceDescriptor& descriptor) const {
- printer_->Print("\n");
- std::string service_name = ModuleLevelServiceDescriptorName(descriptor);
- std::string options_string;
- descriptor.options().SerializeToString(&options_string);
-
- printer_->Print("$service_name$ = _descriptor.ServiceDescriptor(\n",
- "service_name", service_name);
- printer_->Indent();
std::map<std::string, std::string> m;
+ m["service_name"] = ModuleLevelServiceDescriptorName(descriptor);
m["name"] = descriptor.name();
- m["full_name"] = descriptor.full_name();
m["file"] = kDescriptorKey;
- m["index"] = StrCat(descriptor.index());
- m["options_value"] = OptionsValue(options_string);
- const char required_function_arguments[] =
- "name='$name$',\n"
- "full_name='$full_name$',\n"
- "file=$file$,\n"
- "index=$index$,\n"
- "serialized_options=$options_value$,\n"
- "create_key=_descriptor._internal_create_key,\n";
- printer_->Print(m, required_function_arguments);
-
- ServiceDescriptorProto sdp;
- PrintSerializedPbInterval(descriptor, sdp);
-
- printer_->Print("methods=[\n");
- for (int i = 0; i < descriptor.method_count(); ++i) {
- const MethodDescriptor* method = descriptor.method(i);
- method->options().SerializeToString(&options_string);
-
- m.clear();
- m["name"] = method->name();
- m["full_name"] = method->full_name();
- m["index"] = StrCat(method->index());
- m["serialized_options"] = CEscape(options_string);
- m["input_type"] = ModuleLevelDescriptorName(*(method->input_type()));
- m["output_type"] = ModuleLevelDescriptorName(*(method->output_type()));
- m["options_value"] = OptionsValue(options_string);
- printer_->Print("_descriptor.MethodDescriptor(\n");
- printer_->Indent();
- printer_->Print(m,
- "name='$name$',\n"
- "full_name='$full_name$',\n"
- "index=$index$,\n"
- "containing_service=None,\n"
- "input_type=$input_type$,\n"
- "output_type=$output_type$,\n"
- "serialized_options=$options_value$,\n"
- "create_key=_descriptor._internal_create_key,\n");
- printer_->Outdent();
- printer_->Print("),\n");
- }
-
- printer_->Outdent();
- printer_->Print("])\n");
- printer_->Print("_sym_db.RegisterServiceDescriptor($name$)\n", "name",
- service_name);
- printer_->Print("\n");
+ printer_->Print(m, "$service_name$ = $file$.services_by_name['$name$']\n");
}
void Generator::PrintDescriptorKeyAndModuleName(
@@ -713,18 +730,20 @@ void Generator::PrintServiceStub(const ServiceDescriptor& descriptor) const {
// to a Python Descriptor object for message_descriptor.
//
// Mutually recursive with PrintNestedDescriptors().
-void Generator::PrintDescriptor(const Descriptor& message_descriptor) const {
- PrintNestedDescriptors(message_descriptor);
+void Generator::PrintCreateDescriptor(
+ const Descriptor& message_descriptor) const {
+ std::map<std::string, std::string> m;
+ m["name"] = message_descriptor.name();
+ m["full_name"] = message_descriptor.full_name();
+ m["file"] = kDescriptorKey;
+
+ PrintNestedDescriptors(message_descriptor, StripPrintDescriptor::kCreate);
printer_->Print("\n");
printer_->Print("$descriptor_name$ = _descriptor.Descriptor(\n",
"descriptor_name",
ModuleLevelDescriptorName(message_descriptor));
printer_->Indent();
- std::map<std::string, std::string> m;
- m["name"] = message_descriptor.name();
- m["full_name"] = message_descriptor.full_name();
- m["file"] = kDescriptorKey;
const char required_function_arguments[] =
"name='$name$',\n"
"full_name='$full_name$',\n"
@@ -800,22 +819,46 @@ void Generator::PrintDescriptor(const Descriptor& message_descriptor) const {
}
printer_->Outdent();
printer_->Print("],\n");
- // Serialization of proto
- DescriptorProto edp;
- PrintSerializedPbInterval(message_descriptor, edp);
printer_->Outdent();
printer_->Print(")\n");
}
+void Generator::PrintFindDescriptor(
+ const Descriptor& message_descriptor) const {
+ std::map<std::string, std::string> m;
+ m["descriptor_name"] = ModuleLevelDescriptorName(message_descriptor);
+ m["name"] = message_descriptor.name();
+
+ if (message_descriptor.containing_type()) {
+ m["containing_type"] =
+ ModuleLevelDescriptorName(*message_descriptor.containing_type());
+ printer_->Print(m,
+ "$descriptor_name$ = "
+ "$containing_type$.nested_types_by_name['$name$']\n");
+ } else {
+ m["file"] = kDescriptorKey;
+ printer_->Print(
+ m, "$descriptor_name$ = $file$.message_types_by_name['$name$']\n");
+ }
+
+ PrintNestedDescriptors(message_descriptor, StripPrintDescriptor::kFind);
+}
+
// Prints Python Descriptor objects for all nested types contained in
// message_descriptor.
//
// Mutually recursive with PrintDescriptor().
-void Generator::PrintNestedDescriptors(
- const Descriptor& containing_descriptor) const {
- for (int i = 0; i < containing_descriptor.nested_type_count(); ++i) {
- PrintDescriptor(*containing_descriptor.nested_type(i));
+void Generator::PrintNestedDescriptors(const Descriptor& containing_descriptor,
+ StripPrintDescriptor print_mode) const {
+ if (print_mode == StripPrintDescriptor::kCreate) {
+ for (int i = 0; i < containing_descriptor.nested_type_count(); ++i) {
+ PrintCreateDescriptor(*containing_descriptor.nested_type(i));
+ }
+ } else {
+ for (int i = 0; i < containing_descriptor.nested_type_count(); ++i) {
+ PrintFindDescriptor(*containing_descriptor.nested_type(i));
+ }
}
}
@@ -1098,10 +1141,6 @@ void Generator::FixForeignFieldsInExtensions() const {
void Generator::FixForeignFieldsInExtension(
const FieldDescriptor& extension_field) const {
GOOGLE_CHECK(extension_field.is_extension());
- // extension_scope() will be NULL for top-level extensions, which is
- // exactly what FixForeignFieldsInField() wants.
- FixForeignFieldsInField(extension_field.extension_scope(), extension_field,
- "extensions_by_name");
std::map<std::string, std::string> m;
// Confusingly, for FieldDescriptors that happen to be extensions,
@@ -1300,7 +1339,8 @@ std::string Generator::ModuleLevelServiceDescriptorName(
//
template <typename DescriptorT, typename DescriptorProtoT>
void Generator::PrintSerializedPbInterval(const DescriptorT& descriptor,
- DescriptorProtoT& proto) const {
+ DescriptorProtoT& proto,
+ const std::string& name) const {
descriptor.CopyTo(&proto);
std::string sp;
proto.SerializeToString(&sp);
@@ -1308,9 +1348,9 @@ void Generator::PrintSerializedPbInterval(const DescriptorT& descriptor,
GOOGLE_CHECK_GE(offset, 0);
printer_->Print(
- "serialized_start=$serialized_start$,\n"
- "serialized_end=$serialized_end$,\n",
- "serialized_start", StrCat(offset), "serialized_end",
+ "$name$._serialized_start=$serialized_start$\n"
+ "$name$._serialized_end=$serialized_end$\n",
+ "name", name, "serialized_start", StrCat(offset), "serialized_end",
StrCat(offset + sp.size()));
}
@@ -1320,16 +1360,62 @@ void PrintDescriptorOptionsFixingCode(const std::string& descriptor,
io::Printer* printer) {
// Reset the _options to None thus DescriptorBase.GetOptions() can
// parse _options again after extensions are registered.
- printer->Print("$descriptor$._options = None\n", "descriptor", descriptor);
+ printer->Print(
+ "$descriptor$._options = None\n"
+ "$descriptor$._serialized_options = $serialized_value$\n",
+ "descriptor", descriptor, "serialized_value", options);
}
} // namespace
+void Generator::SetSerializedPbInterval() const {
+ // Top level enums.
+ for (int i = 0; i < file_->enum_type_count(); ++i) {
+ EnumDescriptorProto proto;
+ const EnumDescriptor& descriptor = *file_->enum_type(i);
+ PrintSerializedPbInterval(descriptor, proto,
+ ModuleLevelDescriptorName(descriptor));
+ }
+
+ // Messages.
+ for (int i = 0; i < file_->message_type_count(); ++i) {
+ SetMessagePbInterval(*file_->message_type(i));
+ }
+
+ // Services.
+ for (int i = 0; i < file_->service_count(); ++i) {
+ ServiceDescriptorProto proto;
+ const ServiceDescriptor& service = *file_->service(i);
+ PrintSerializedPbInterval(service, proto,
+ ModuleLevelServiceDescriptorName(service));
+ }
+}
+
+void Generator::SetMessagePbInterval(const Descriptor& descriptor) const {
+ DescriptorProto message_proto;
+ PrintSerializedPbInterval(descriptor, message_proto,
+ ModuleLevelDescriptorName(descriptor));
+
+ // Nested messages.
+ for (int i = 0; i < descriptor.nested_type_count(); ++i) {
+ SetMessagePbInterval(*descriptor.nested_type(i));
+ }
+
+ for (int i = 0; i < descriptor.enum_type_count(); ++i) {
+ EnumDescriptorProto proto;
+ const EnumDescriptor& enum_des = *descriptor.enum_type(i);
+ PrintSerializedPbInterval(enum_des, proto,
+ ModuleLevelDescriptorName(enum_des));
+ }
+}
+
// Prints expressions that set the options field of all descriptors.
void Generator::FixAllDescriptorOptions() const {
// Prints an expression that sets the file descriptor's options.
std::string file_options = OptionsValue(file_->options().SerializeAsString());
if (file_options != "None") {
PrintDescriptorOptionsFixingCode(kDescriptorKey, file_options, printer_);
+ } else {
+ printer_->Print("DESCRIPTOR._options = None\n");
}
// Prints expressions that set the options for all top level enums.
for (int i = 0; i < file_->enum_type_count(); ++i) {
@@ -1346,6 +1432,10 @@ void Generator::FixAllDescriptorOptions() const {
for (int i = 0; i < file_->message_type_count(); ++i) {
FixOptionsForMessage(*file_->message_type(i));
}
+
+ for (int i = 0; i < file_->service_count(); ++i) {
+ FixOptionsForService(*file_->service(i));
+ }
}
void Generator::FixOptionsForOneof(const OneofDescriptor& oneof) const {
@@ -1380,6 +1470,31 @@ void Generator::FixOptionsForEnum(const EnumDescriptor& enum_descriptor) const {
}
}
+// Prints expressions that set the options for an service descriptor and its
+// value descriptors.
+void Generator::FixOptionsForService(
+ const ServiceDescriptor& service_descriptor) const {
+ std::string descriptor_name =
+ ModuleLevelServiceDescriptorName(service_descriptor);
+ std::string service_options =
+ OptionsValue(service_descriptor.options().SerializeAsString());
+ if (service_options != "None") {
+ PrintDescriptorOptionsFixingCode(descriptor_name, service_options,
+ printer_);
+ }
+
+ for (int i = 0; i < service_descriptor.method_count(); ++i) {
+ const MethodDescriptor* method = service_descriptor.method(i);
+ std::string method_options =
+ OptionsValue(method->options().SerializeAsString());
+ if (method_options != "None") {
+ std::string method_name =
+ descriptor_name + ".methods_by_name['" + method->name() + "']";
+ PrintDescriptorOptionsFixingCode(method_name, method_options, printer_);
+ }
+ }
+}
+
// Prints expressions that set the options for field descriptors (including
// extensions).
void Generator::FixOptionsForField(const FieldDescriptor& field) const {
diff --git a/src/google/protobuf/compiler/python/python_generator.h b/src/google/protobuf/compiler/python/python_generator.h
index ed1c99504..3b4c1323b 100644
--- a/src/google/protobuf/compiler/python/python_generator.h
+++ b/src/google/protobuf/compiler/python/python_generator.h
@@ -59,6 +59,8 @@ class Printer;
namespace compiler {
namespace python {
+enum class StripPrintDescriptor { kCreate, kFind };
+
// CodeGenerator implementation for generated Python protocol buffer classes.
// If you create your own protocol compiler binary and you want it to support
// Python output, you can do so by registering an instance of this
@@ -79,9 +81,11 @@ class PROTOC_EXPORT Generator : public CodeGenerator {
void PrintImports() const;
void PrintFileDescriptor() const;
void PrintTopLevelEnums() const;
- void PrintAllNestedEnumsInFile() const;
- void PrintNestedEnums(const Descriptor& descriptor) const;
- void PrintEnum(const EnumDescriptor& enum_descriptor) const;
+ void PrintAllNestedEnumsInFile(StripPrintDescriptor print_mode) const;
+ void PrintNestedEnums(const Descriptor& descriptor,
+ StripPrintDescriptor print_mode) const;
+ void PrintCreateEnum(const EnumDescriptor& enum_descriptor) const;
+ void PrintFindEnum(const EnumDescriptor& enum_descriptor) const;
void PrintTopLevelExtensions() const;
@@ -93,9 +97,11 @@ class PROTOC_EXPORT Generator : public CodeGenerator {
const FieldDescriptor* (Descriptor::*GetterFn)(int)const) const;
void PrintFieldsInDescriptor(const Descriptor& message_descriptor) const;
void PrintExtensionsInDescriptor(const Descriptor& message_descriptor) const;
- void PrintMessageDescriptors() const;
- void PrintDescriptor(const Descriptor& message_descriptor) const;
- void PrintNestedDescriptors(const Descriptor& containing_descriptor) const;
+ void PrintMessageDescriptors(StripPrintDescriptor print_mode) const;
+ void PrintCreateDescriptor(const Descriptor& message_descriptor) const;
+ void PrintFindDescriptor(const Descriptor& message_descriptor) const;
+ void PrintNestedDescriptors(const Descriptor& containing_descriptor,
+ StripPrintDescriptor print_mode) const;
void PrintMessages() const;
void PrintMessage(const Descriptor& message_descriptor,
@@ -150,14 +156,19 @@ class PROTOC_EXPORT Generator : public CodeGenerator {
template <typename DescriptorT, typename DescriptorProtoT>
void PrintSerializedPbInterval(const DescriptorT& descriptor,
- DescriptorProtoT& proto) const;
+ DescriptorProtoT& proto,
+ const std::string& name) const;
void FixAllDescriptorOptions() const;
void FixOptionsForField(const FieldDescriptor& field) const;
void FixOptionsForOneof(const OneofDescriptor& oneof) const;
void FixOptionsForEnum(const EnumDescriptor& descriptor) const;
+ void FixOptionsForService(const ServiceDescriptor& descriptor) const;
void FixOptionsForMessage(const Descriptor& descriptor) const;
+ void SetSerializedPbInterval() const;
+ void SetMessagePbInterval(const Descriptor& descriptor) const;
+
void CopyPublicDependenciesAliases(const std::string& copy_from,
const FileDescriptor* file) const;
diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc
index 0b057cd86..2f7f95192 100644
--- a/src/google/protobuf/descriptor.pb.cc
+++ b/src/google/protobuf/descriptor.pb.cc
@@ -453,7 +453,7 @@ static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[6];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fdescriptor_2eproto = nullptr;
-const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
+const uint32_t TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorSet, _internal_metadata_),
~0u, // no _extensions_
@@ -1308,7 +1308,7 @@ void FileDescriptorSet::SetCachedSize(int size) const {
void FileDescriptorSet::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FileDescriptorSet)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1319,12 +1319,12 @@ void FileDescriptorSet::Clear() {
const char* FileDescriptorSet::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated .google.protobuf.FileDescriptorProto file = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr -= 1;
do {
ptr += 1;
@@ -1358,10 +1358,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* FileDescriptorSet::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* FileDescriptorSet::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorSet)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated .google.protobuf.FileDescriptorProto file = 1;
@@ -1384,7 +1384,7 @@ size_t FileDescriptorSet::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.FileDescriptorSet)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1414,7 +1414,7 @@ void FileDescriptorSet::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void FileDescriptorSet::MergeFrom(const FileDescriptorSet& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileDescriptorSet)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
file_.MergeFrom(from.file_);
@@ -1505,16 +1505,25 @@ FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from)
weak_dependency_(from.weak_dependency_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
}
package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_package()) {
package_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_package(),
GetArenaForAllocation());
}
syntax_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ syntax_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_syntax()) {
syntax_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_syntax(),
GetArenaForAllocation());
@@ -1534,8 +1543,17 @@ FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from)
inline void FileDescriptorProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
syntax_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ syntax_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&options_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&source_code_info_) -
@@ -1570,7 +1588,7 @@ void FileDescriptorProto::SetCachedSize(int size) const {
void FileDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FileDescriptorProto)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1609,12 +1627,12 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string name = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -1626,7 +1644,7 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// optional string package = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
auto str = _internal_mutable_package();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -1638,7 +1656,7 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// repeated string dependency = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
@@ -1655,7 +1673,7 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// repeated .google.protobuf.DescriptorProto message_type = 4;
case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr -= 1;
do {
ptr += 1;
@@ -1668,7 +1686,7 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
case 5:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
ptr -= 1;
do {
ptr += 1;
@@ -1681,7 +1699,7 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// repeated .google.protobuf.ServiceDescriptorProto service = 6;
case 6:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
ptr -= 1;
do {
ptr += 1;
@@ -1694,7 +1712,7 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// repeated .google.protobuf.FieldDescriptorProto extension = 7;
case 7:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
ptr -= 1;
do {
ptr += 1;
@@ -1707,7 +1725,7 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// optional .google.protobuf.FileOptions options = 8;
case 8:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
ptr = ctx->ParseMessage(_internal_mutable_options(), ptr);
CHK_(ptr);
} else
@@ -1715,7 +1733,7 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// optional .google.protobuf.SourceCodeInfo source_code_info = 9;
case 9:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
ptr = ctx->ParseMessage(_internal_mutable_source_code_info(), ptr);
CHK_(ptr);
} else
@@ -1723,7 +1741,7 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// repeated int32 public_dependency = 10;
case 10:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
ptr -= 1;
do {
ptr += 1;
@@ -1731,7 +1749,7 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<80>(ptr));
- } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82) {
+ } else if (static_cast<uint8_t>(tag) == 82) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_public_dependency(), ptr, ctx);
CHK_(ptr);
} else
@@ -1739,7 +1757,7 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// repeated int32 weak_dependency = 11;
case 11:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
ptr -= 1;
do {
ptr += 1;
@@ -1747,7 +1765,7 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<88>(ptr));
- } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90) {
+ } else if (static_cast<uint8_t>(tag) == 90) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_weak_dependency(), ptr, ctx);
CHK_(ptr);
} else
@@ -1755,7 +1773,7 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// optional string syntax = 12;
case 12:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 98)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
auto str = _internal_mutable_syntax();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -1789,10 +1807,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* FileDescriptorProto::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* FileDescriptorProto::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorProto)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -1908,7 +1926,7 @@ size_t FileDescriptorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.FileDescriptorProto)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -2023,7 +2041,7 @@ void FileDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void FileDescriptorProto::MergeFrom(const FileDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileDescriptorProto)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
dependency_.MergeFrom(from.dependency_);
@@ -2190,7 +2208,7 @@ void DescriptorProto_ExtensionRange::SetCachedSize(int size) const {
void DescriptorProto_ExtensionRange::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.DescriptorProto.ExtensionRange)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -2212,12 +2230,12 @@ const char* DescriptorProto_ExtensionRange::_InternalParse(const char* ptr, ::PR
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional int32 start = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_start(&has_bits);
start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
@@ -2226,7 +2244,7 @@ const char* DescriptorProto_ExtensionRange::_InternalParse(const char* ptr, ::PR
continue;
// optional int32 end = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_end(&has_bits);
end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
@@ -2235,7 +2253,7 @@ const char* DescriptorProto_ExtensionRange::_InternalParse(const char* ptr, ::PR
continue;
// optional .google.protobuf.ExtensionRangeOptions options = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr = ctx->ParseMessage(_internal_mutable_options(), ptr);
CHK_(ptr);
} else
@@ -2265,10 +2283,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* DescriptorProto_ExtensionRange::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* DescriptorProto_ExtensionRange::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ExtensionRange)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -2304,7 +2322,7 @@ size_t DescriptorProto_ExtensionRange::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.DescriptorProto.ExtensionRange)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -2347,7 +2365,7 @@ void DescriptorProto_ExtensionRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*
void DescriptorProto_ExtensionRange::MergeFrom(const DescriptorProto_ExtensionRange& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto.ExtensionRange)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
@@ -2460,7 +2478,7 @@ void DescriptorProto_ReservedRange::SetCachedSize(int size) const {
void DescriptorProto_ReservedRange::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.DescriptorProto.ReservedRange)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -2478,12 +2496,12 @@ const char* DescriptorProto_ReservedRange::_InternalParse(const char* ptr, ::PRO
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional int32 start = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_start(&has_bits);
start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
@@ -2492,7 +2510,7 @@ const char* DescriptorProto_ReservedRange::_InternalParse(const char* ptr, ::PRO
continue;
// optional int32 end = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_end(&has_bits);
end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
@@ -2523,10 +2541,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* DescriptorProto_ReservedRange::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* DescriptorProto_ReservedRange::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ReservedRange)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -2554,7 +2572,7 @@ size_t DescriptorProto_ReservedRange::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.DescriptorProto.ReservedRange)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -2590,7 +2608,7 @@ void DescriptorProto_ReservedRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*
void DescriptorProto_ReservedRange::MergeFrom(const DescriptorProto_ReservedRange& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto.ReservedRange)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
@@ -2683,6 +2701,9 @@ DescriptorProto::DescriptorProto(const DescriptorProto& from)
reserved_name_(from.reserved_name_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
@@ -2697,6 +2718,9 @@ DescriptorProto::DescriptorProto(const DescriptorProto& from)
inline void DescriptorProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
options_ = nullptr;
}
@@ -2725,7 +2749,7 @@ void DescriptorProto::SetCachedSize(int size) const {
void DescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.DescriptorProto)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -2755,12 +2779,12 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string name = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -2772,7 +2796,7 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC
continue;
// repeated .google.protobuf.FieldDescriptorProto field = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
@@ -2785,7 +2809,7 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC
continue;
// repeated .google.protobuf.DescriptorProto nested_type = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
@@ -2798,7 +2822,7 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC
continue;
// repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr -= 1;
do {
ptr += 1;
@@ -2811,7 +2835,7 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC
continue;
// repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
case 5:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
ptr -= 1;
do {
ptr += 1;
@@ -2824,7 +2848,7 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC
continue;
// repeated .google.protobuf.FieldDescriptorProto extension = 6;
case 6:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
ptr -= 1;
do {
ptr += 1;
@@ -2837,7 +2861,7 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC
continue;
// optional .google.protobuf.MessageOptions options = 7;
case 7:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
ptr = ctx->ParseMessage(_internal_mutable_options(), ptr);
CHK_(ptr);
} else
@@ -2845,7 +2869,7 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC
continue;
// repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
case 8:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
ptr -= 1;
do {
ptr += 1;
@@ -2858,7 +2882,7 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC
continue;
// repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
case 9:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
ptr -= 1;
do {
ptr += 1;
@@ -2871,7 +2895,7 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC
continue;
// repeated string reserved_name = 10;
case 10:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
ptr -= 1;
do {
ptr += 1;
@@ -2910,10 +2934,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* DescriptorProto::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* DescriptorProto::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -3013,7 +3037,7 @@ size_t DescriptorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.DescriptorProto)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -3110,7 +3134,7 @@ void DescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void DescriptorProto::MergeFrom(const DescriptorProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
field_.MergeFrom(from.field_);
@@ -3232,7 +3256,7 @@ void ExtensionRangeOptions::SetCachedSize(int size) const {
void ExtensionRangeOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.ExtensionRangeOptions)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -3244,12 +3268,12 @@ void ExtensionRangeOptions::Clear() {
const char* ExtensionRangeOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
case 999:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
ptr -= 2;
do {
ptr += 2;
@@ -3288,10 +3312,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* ExtensionRangeOptions::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* ExtensionRangeOptions::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ExtensionRangeOptions)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
@@ -3320,7 +3344,7 @@ size_t ExtensionRangeOptions::ByteSizeLong() const {
total_size += _extensions_.ByteSize();
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -3350,7 +3374,7 @@ void ExtensionRangeOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void ExtensionRangeOptions::MergeFrom(const ExtensionRangeOptions& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ExtensionRangeOptions)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
@@ -3446,26 +3470,41 @@ FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from)
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
}
extendee_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ extendee_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_extendee()) {
extendee_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_extendee(),
GetArenaForAllocation());
}
type_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_type_name()) {
type_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_type_name(),
GetArenaForAllocation());
}
default_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_default_value()) {
default_value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_default_value(),
GetArenaForAllocation());
}
json_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_json_name()) {
json_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_json_name(),
GetArenaForAllocation());
@@ -3483,10 +3522,25 @@ FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from)
inline void FieldDescriptorProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
extendee_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ extendee_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
type_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
default_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
json_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&options_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&proto3_optional_) -
@@ -3524,7 +3578,7 @@ void FieldDescriptorProto::SetCachedSize(int size) const {
void FieldDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FieldDescriptorProto)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -3568,12 +3622,12 @@ const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAM
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string name = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -3585,7 +3639,7 @@ const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAM
continue;
// optional string extendee = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
auto str = _internal_mutable_extendee();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -3597,7 +3651,7 @@ const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAM
continue;
// optional int32 number = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_number(&has_bits);
number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
@@ -3606,8 +3660,8 @@ const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAM
continue;
// optional .google.protobuf.FieldDescriptorProto.Label label = 4;
case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
- ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
+ uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label_IsValid(val))) {
_internal_set_label(static_cast<::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label>(val));
@@ -3619,8 +3673,8 @@ const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAM
continue;
// optional .google.protobuf.FieldDescriptorProto.Type type = 5;
case 5:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
- ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
+ uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type_IsValid(val))) {
_internal_set_type(static_cast<::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type>(val));
@@ -3632,7 +3686,7 @@ const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAM
continue;
// optional string type_name = 6;
case 6:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
auto str = _internal_mutable_type_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -3644,7 +3698,7 @@ const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAM
continue;
// optional string default_value = 7;
case 7:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
auto str = _internal_mutable_default_value();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -3656,7 +3710,7 @@ const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAM
continue;
// optional .google.protobuf.FieldOptions options = 8;
case 8:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
ptr = ctx->ParseMessage(_internal_mutable_options(), ptr);
CHK_(ptr);
} else
@@ -3664,7 +3718,7 @@ const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAM
continue;
// optional int32 oneof_index = 9;
case 9:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
_Internal::set_has_oneof_index(&has_bits);
oneof_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
@@ -3673,7 +3727,7 @@ const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAM
continue;
// optional string json_name = 10;
case 10:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
auto str = _internal_mutable_json_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -3685,7 +3739,7 @@ const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAM
continue;
// optional bool proto3_optional = 17;
case 17:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 136)) {
_Internal::set_has_proto3_optional(&has_bits);
proto3_optional_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -3716,10 +3770,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* FieldDescriptorProto::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* FieldDescriptorProto::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldDescriptorProto)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -3825,7 +3879,7 @@ size_t FieldDescriptorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldDescriptorProto)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -3922,7 +3976,7 @@ void FieldDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void FieldDescriptorProto::MergeFrom(const FieldDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldDescriptorProto)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
@@ -4061,6 +4115,9 @@ OneofDescriptorProto::OneofDescriptorProto(const OneofDescriptorProto& from)
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
@@ -4075,6 +4132,9 @@ OneofDescriptorProto::OneofDescriptorProto(const OneofDescriptorProto& from)
inline void OneofDescriptorProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
options_ = nullptr;
}
@@ -4103,7 +4163,7 @@ void OneofDescriptorProto::SetCachedSize(int size) const {
void OneofDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.OneofDescriptorProto)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -4125,12 +4185,12 @@ const char* OneofDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAM
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string name = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -4142,7 +4202,7 @@ const char* OneofDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAM
continue;
// optional .google.protobuf.OneofOptions options = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr = ctx->ParseMessage(_internal_mutable_options(), ptr);
CHK_(ptr);
} else
@@ -4172,10 +4232,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* OneofDescriptorProto::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* OneofDescriptorProto::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.OneofDescriptorProto)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -4209,7 +4269,7 @@ size_t OneofDescriptorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.OneofDescriptorProto)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -4249,7 +4309,7 @@ void OneofDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void OneofDescriptorProto::MergeFrom(const OneofDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.OneofDescriptorProto)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
@@ -4360,7 +4420,7 @@ void EnumDescriptorProto_EnumReservedRange::SetCachedSize(int size) const {
void EnumDescriptorProto_EnumReservedRange::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.EnumDescriptorProto.EnumReservedRange)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -4378,12 +4438,12 @@ const char* EnumDescriptorProto_EnumReservedRange::_InternalParse(const char* pt
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional int32 start = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_start(&has_bits);
start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
@@ -4392,7 +4452,7 @@ const char* EnumDescriptorProto_EnumReservedRange::_InternalParse(const char* pt
continue;
// optional int32 end = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_end(&has_bits);
end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
@@ -4423,10 +4483,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* EnumDescriptorProto_EnumReservedRange::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* EnumDescriptorProto_EnumReservedRange::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumDescriptorProto.EnumReservedRange)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -4454,7 +4514,7 @@ size_t EnumDescriptorProto_EnumReservedRange::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumDescriptorProto.EnumReservedRange)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -4490,7 +4550,7 @@ void EnumDescriptorProto_EnumReservedRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::M
void EnumDescriptorProto_EnumReservedRange::MergeFrom(const EnumDescriptorProto_EnumReservedRange& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumDescriptorProto.EnumReservedRange)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
@@ -4573,6 +4633,9 @@ EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from)
reserved_name_(from.reserved_name_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
@@ -4587,6 +4650,9 @@ EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from)
inline void EnumDescriptorProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
options_ = nullptr;
}
@@ -4615,7 +4681,7 @@ void EnumDescriptorProto::SetCachedSize(int size) const {
void EnumDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.EnumDescriptorProto)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -4640,12 +4706,12 @@ const char* EnumDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string name = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -4657,7 +4723,7 @@ const char* EnumDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// repeated .google.protobuf.EnumValueDescriptorProto value = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
@@ -4670,7 +4736,7 @@ const char* EnumDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// optional .google.protobuf.EnumOptions options = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr = ctx->ParseMessage(_internal_mutable_options(), ptr);
CHK_(ptr);
} else
@@ -4678,7 +4744,7 @@ const char* EnumDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;
case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr -= 1;
do {
ptr += 1;
@@ -4691,7 +4757,7 @@ const char* EnumDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// repeated string reserved_name = 5;
case 5:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
ptr -= 1;
do {
ptr += 1;
@@ -4730,10 +4796,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* EnumDescriptorProto::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* EnumDescriptorProto::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumDescriptorProto)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -4793,7 +4859,7 @@ size_t EnumDescriptorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumDescriptorProto)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -4855,7 +4921,7 @@ void EnumDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void EnumDescriptorProto::MergeFrom(const EnumDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumDescriptorProto)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
value_.MergeFrom(from.value_);
@@ -4946,6 +5012,9 @@ EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProt
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
@@ -4961,6 +5030,9 @@ EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProt
inline void EnumValueDescriptorProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&options_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&number_) -
@@ -4992,7 +5064,7 @@ void EnumValueDescriptorProto::SetCachedSize(int size) const {
void EnumValueDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.EnumValueDescriptorProto)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -5015,12 +5087,12 @@ const char* EnumValueDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string name = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -5032,7 +5104,7 @@ const char* EnumValueDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF
continue;
// optional int32 number = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_number(&has_bits);
number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
@@ -5041,7 +5113,7 @@ const char* EnumValueDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF
continue;
// optional .google.protobuf.EnumValueOptions options = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr = ctx->ParseMessage(_internal_mutable_options(), ptr);
CHK_(ptr);
} else
@@ -5071,10 +5143,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* EnumValueDescriptorProto::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* EnumValueDescriptorProto::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueDescriptorProto)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -5114,7 +5186,7 @@ size_t EnumValueDescriptorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValueDescriptorProto)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -5159,7 +5231,7 @@ void EnumValueDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void EnumValueDescriptorProto::MergeFrom(const EnumValueDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValueDescriptorProto)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
@@ -5251,6 +5323,9 @@ ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& fro
method_(from.method_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
@@ -5265,6 +5340,9 @@ ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& fro
inline void ServiceDescriptorProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
options_ = nullptr;
}
@@ -5293,7 +5371,7 @@ void ServiceDescriptorProto::SetCachedSize(int size) const {
void ServiceDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.ServiceDescriptorProto)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -5316,12 +5394,12 @@ const char* ServiceDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_N
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string name = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -5333,7 +5411,7 @@ const char* ServiceDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_N
continue;
// repeated .google.protobuf.MethodDescriptorProto method = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
@@ -5346,7 +5424,7 @@ const char* ServiceDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_N
continue;
// optional .google.protobuf.ServiceOptions options = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr = ctx->ParseMessage(_internal_mutable_options(), ptr);
CHK_(ptr);
} else
@@ -5376,10 +5454,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* ServiceDescriptorProto::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* ServiceDescriptorProto::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceDescriptorProto)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -5421,7 +5499,7 @@ size_t ServiceDescriptorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.ServiceDescriptorProto)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -5468,7 +5546,7 @@ void ServiceDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void ServiceDescriptorProto::MergeFrom(const ServiceDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ServiceDescriptorProto)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
method_.MergeFrom(from.method_);
@@ -5564,16 +5642,25 @@ MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from)
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
}
input_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ input_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_input_type()) {
input_type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_input_type(),
GetArenaForAllocation());
}
output_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ output_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_output_type()) {
output_type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_output_type(),
GetArenaForAllocation());
@@ -5591,8 +5678,17 @@ MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from)
inline void MethodDescriptorProto::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
input_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ input_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
output_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ output_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&options_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&server_streaming_) -
@@ -5626,7 +5722,7 @@ void MethodDescriptorProto::SetCachedSize(int size) const {
void MethodDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.MethodDescriptorProto)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -5657,12 +5753,12 @@ const char* MethodDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NA
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string name = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -5674,7 +5770,7 @@ const char* MethodDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NA
continue;
// optional string input_type = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
auto str = _internal_mutable_input_type();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -5686,7 +5782,7 @@ const char* MethodDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NA
continue;
// optional string output_type = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
auto str = _internal_mutable_output_type();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -5698,7 +5794,7 @@ const char* MethodDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NA
continue;
// optional .google.protobuf.MethodOptions options = 4;
case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr = ctx->ParseMessage(_internal_mutable_options(), ptr);
CHK_(ptr);
} else
@@ -5706,7 +5802,7 @@ const char* MethodDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NA
continue;
// optional bool client_streaming = 5 [default = false];
case 5:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_Internal::set_has_client_streaming(&has_bits);
client_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -5715,7 +5811,7 @@ const char* MethodDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NA
continue;
// optional bool server_streaming = 6 [default = false];
case 6:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
_Internal::set_has_server_streaming(&has_bits);
server_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -5746,10 +5842,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* MethodDescriptorProto::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* MethodDescriptorProto::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodDescriptorProto)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -5815,7 +5911,7 @@ size_t MethodDescriptorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.MethodDescriptorProto)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -5879,7 +5975,7 @@ void MethodDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void MethodDescriptorProto::MergeFrom(const MethodDescriptorProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MethodDescriptorProto)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
@@ -6041,51 +6137,81 @@ FileOptions::FileOptions(const FileOptions& from)
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
_extensions_.MergeFrom(from._extensions_);
java_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ java_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_java_package()) {
java_package_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_java_package(),
GetArenaForAllocation());
}
java_outer_classname_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ java_outer_classname_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_java_outer_classname()) {
java_outer_classname_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_java_outer_classname(),
GetArenaForAllocation());
}
go_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ go_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_go_package()) {
go_package_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_go_package(),
GetArenaForAllocation());
}
objc_class_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ objc_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_objc_class_prefix()) {
objc_class_prefix_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_objc_class_prefix(),
GetArenaForAllocation());
}
csharp_namespace_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ csharp_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_csharp_namespace()) {
csharp_namespace_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_csharp_namespace(),
GetArenaForAllocation());
}
swift_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ swift_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_swift_prefix()) {
swift_prefix_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_swift_prefix(),
GetArenaForAllocation());
}
php_class_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ php_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_php_class_prefix()) {
php_class_prefix_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_php_class_prefix(),
GetArenaForAllocation());
}
php_namespace_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ php_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_php_namespace()) {
php_namespace_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_php_namespace(),
GetArenaForAllocation());
}
php_metadata_namespace_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ php_metadata_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_php_metadata_namespace()) {
php_metadata_namespace_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_php_metadata_namespace(),
GetArenaForAllocation());
}
ruby_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ ruby_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_ruby_package()) {
ruby_package_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_ruby_package(),
GetArenaForAllocation());
@@ -6098,15 +6224,45 @@ FileOptions::FileOptions(const FileOptions& from)
inline void FileOptions::SharedCtor() {
java_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ java_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
java_outer_classname_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ java_outer_classname_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
go_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ go_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
objc_class_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ objc_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
csharp_namespace_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ csharp_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
swift_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ swift_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
php_class_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ php_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
php_namespace_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ php_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
php_metadata_namespace_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ php_metadata_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
ruby_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ ruby_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&java_multiple_files_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&deprecated_) -
@@ -6148,7 +6304,7 @@ void FileOptions::SetCachedSize(int size) const {
void FileOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FileOptions)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -6209,12 +6365,12 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string java_package = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_java_package();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -6226,7 +6382,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// optional string java_outer_classname = 8;
case 8:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
auto str = _internal_mutable_java_outer_classname();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -6238,8 +6394,8 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
case 9:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) {
- ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
+ uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode_IsValid(val))) {
_internal_set_optimize_for(static_cast<::PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode>(val));
@@ -6251,7 +6407,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// optional bool java_multiple_files = 10 [default = false];
case 10:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
_Internal::set_has_java_multiple_files(&has_bits);
java_multiple_files_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -6260,7 +6416,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// optional string go_package = 11;
case 11:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
auto str = _internal_mutable_go_package();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -6272,7 +6428,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// optional bool cc_generic_services = 16 [default = false];
case 16:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 128)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 128)) {
_Internal::set_has_cc_generic_services(&has_bits);
cc_generic_services_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -6281,7 +6437,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// optional bool java_generic_services = 17 [default = false];
case 17:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 136)) {
_Internal::set_has_java_generic_services(&has_bits);
java_generic_services_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -6290,7 +6446,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// optional bool py_generic_services = 18 [default = false];
case 18:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 144)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 144)) {
_Internal::set_has_py_generic_services(&has_bits);
py_generic_services_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -6299,7 +6455,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// optional bool java_generate_equals_and_hash = 20 [deprecated = true];
case 20:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 160)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 160)) {
_Internal::set_has_java_generate_equals_and_hash(&has_bits);
java_generate_equals_and_hash_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -6308,7 +6464,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// optional bool deprecated = 23 [default = false];
case 23:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 184)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 184)) {
_Internal::set_has_deprecated(&has_bits);
deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -6317,7 +6473,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// optional bool java_string_check_utf8 = 27 [default = false];
case 27:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 216)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 216)) {
_Internal::set_has_java_string_check_utf8(&has_bits);
java_string_check_utf8_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -6326,7 +6482,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// optional bool cc_enable_arenas = 31 [default = true];
case 31:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 248)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 248)) {
_Internal::set_has_cc_enable_arenas(&has_bits);
cc_enable_arenas_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -6335,7 +6491,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// optional string objc_class_prefix = 36;
case 36:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
auto str = _internal_mutable_objc_class_prefix();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -6347,7 +6503,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// optional string csharp_namespace = 37;
case 37:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
auto str = _internal_mutable_csharp_namespace();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -6359,7 +6515,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// optional string swift_prefix = 39;
case 39:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
auto str = _internal_mutable_swift_prefix();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -6371,7 +6527,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// optional string php_class_prefix = 40;
case 40:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
auto str = _internal_mutable_php_class_prefix();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -6383,7 +6539,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// optional string php_namespace = 41;
case 41:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
auto str = _internal_mutable_php_namespace();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -6395,7 +6551,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// optional bool php_generic_services = 42 [default = false];
case 42:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
_Internal::set_has_php_generic_services(&has_bits);
php_generic_services_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -6404,7 +6560,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// optional string php_metadata_namespace = 44;
case 44:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 98)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
auto str = _internal_mutable_php_metadata_namespace();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -6416,7 +6572,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// optional string ruby_package = 45;
case 45:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 106)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
auto str = _internal_mutable_ruby_package();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -6428,7 +6584,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
case 999:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
ptr -= 2;
do {
ptr += 2;
@@ -6468,10 +6624,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* FileOptions::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* FileOptions::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileOptions)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -6662,7 +6818,7 @@ size_t FileOptions::ByteSizeLong() const {
total_size += _extensions_.ByteSize();
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -6820,7 +6976,7 @@ void FileOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void FileOptions::MergeFrom(const FileOptions& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileOptions)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
@@ -7059,7 +7215,7 @@ void MessageOptions::SetCachedSize(int size) const {
void MessageOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.MessageOptions)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -7076,12 +7232,12 @@ const char* MessageOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional bool message_set_wire_format = 1 [default = false];
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_message_set_wire_format(&has_bits);
message_set_wire_format_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -7090,7 +7246,7 @@ const char* MessageOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE
continue;
// optional bool no_standard_descriptor_accessor = 2 [default = false];
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_no_standard_descriptor_accessor(&has_bits);
no_standard_descriptor_accessor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -7099,7 +7255,7 @@ const char* MessageOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE
continue;
// optional bool deprecated = 3 [default = false];
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_deprecated(&has_bits);
deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -7108,7 +7264,7 @@ const char* MessageOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE
continue;
// optional bool map_entry = 7;
case 7:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
_Internal::set_has_map_entry(&has_bits);
map_entry_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -7117,7 +7273,7 @@ const char* MessageOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE
continue;
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
case 999:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
ptr -= 2;
do {
ptr += 2;
@@ -7157,10 +7313,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* MessageOptions::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* MessageOptions::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MessageOptions)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -7214,7 +7370,7 @@ size_t MessageOptions::ByteSizeLong() const {
total_size += _extensions_.ByteSize();
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -7267,7 +7423,7 @@ void MessageOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void MessageOptions::MergeFrom(const MessageOptions& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MessageOptions)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
@@ -7405,7 +7561,7 @@ void FieldOptions::SetCachedSize(int size) const {
void FieldOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FieldOptions)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -7425,13 +7581,13 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
- ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
+ uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::PROTOBUF_NAMESPACE_ID::FieldOptions_CType_IsValid(val))) {
_internal_set_ctype(static_cast<::PROTOBUF_NAMESPACE_ID::FieldOptions_CType>(val));
@@ -7443,7 +7599,7 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I
continue;
// optional bool packed = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_packed(&has_bits);
packed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -7452,7 +7608,7 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I
continue;
// optional bool deprecated = 3 [default = false];
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_deprecated(&has_bits);
deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -7461,7 +7617,7 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I
continue;
// optional bool lazy = 5 [default = false];
case 5:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_Internal::set_has_lazy(&has_bits);
lazy_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -7470,8 +7626,8 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I
continue;
// optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
case 6:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
- ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
+ uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::PROTOBUF_NAMESPACE_ID::FieldOptions_JSType_IsValid(val))) {
_internal_set_jstype(static_cast<::PROTOBUF_NAMESPACE_ID::FieldOptions_JSType>(val));
@@ -7483,7 +7639,7 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I
continue;
// optional bool weak = 10 [default = false];
case 10:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
_Internal::set_has_weak(&has_bits);
weak_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -7492,7 +7648,7 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I
continue;
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
case 999:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
ptr -= 2;
do {
ptr += 2;
@@ -7532,10 +7688,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* FieldOptions::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* FieldOptions::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldOptions)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -7603,7 +7759,7 @@ size_t FieldOptions::ByteSizeLong() const {
total_size += _extensions_.ByteSize();
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -7668,7 +7824,7 @@ void FieldOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void FieldOptions::MergeFrom(const FieldOptions& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldOptions)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
@@ -7785,7 +7941,7 @@ void OneofOptions::SetCachedSize(int size) const {
void OneofOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.OneofOptions)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -7797,12 +7953,12 @@ void OneofOptions::Clear() {
const char* OneofOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
case 999:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
ptr -= 2;
do {
ptr += 2;
@@ -7841,10 +7997,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* OneofOptions::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* OneofOptions::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.OneofOptions)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
@@ -7873,7 +8029,7 @@ size_t OneofOptions::ByteSizeLong() const {
total_size += _extensions_.ByteSize();
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -7903,7 +8059,7 @@ void OneofOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void OneofOptions::MergeFrom(const OneofOptions& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.OneofOptions)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
@@ -8006,7 +8162,7 @@ void EnumOptions::SetCachedSize(int size) const {
void EnumOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.EnumOptions)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -8023,12 +8179,12 @@ const char* EnumOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional bool allow_alias = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_allow_alias(&has_bits);
allow_alias_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -8037,7 +8193,7 @@ const char* EnumOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// optional bool deprecated = 3 [default = false];
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_deprecated(&has_bits);
deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -8046,7 +8202,7 @@ const char* EnumOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID
continue;
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
case 999:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
ptr -= 2;
do {
ptr += 2;
@@ -8086,10 +8242,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* EnumOptions::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* EnumOptions::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumOptions)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -8131,7 +8287,7 @@ size_t EnumOptions::ByteSizeLong() const {
total_size += _extensions_.ByteSize();
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -8174,7 +8330,7 @@ void EnumOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void EnumOptions::MergeFrom(const EnumOptions& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumOptions)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
@@ -8286,7 +8442,7 @@ void EnumValueOptions::SetCachedSize(int size) const {
void EnumValueOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.EnumValueOptions)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -8301,12 +8457,12 @@ const char* EnumValueOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPA
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional bool deprecated = 1 [default = false];
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_deprecated(&has_bits);
deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -8315,7 +8471,7 @@ const char* EnumValueOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPA
continue;
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
case 999:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
ptr -= 2;
do {
ptr += 2;
@@ -8355,10 +8511,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* EnumValueOptions::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* EnumValueOptions::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueOptions)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -8394,7 +8550,7 @@ size_t EnumValueOptions::ByteSizeLong() const {
total_size += _extensions_.ByteSize();
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -8430,7 +8586,7 @@ void EnumValueOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void EnumValueOptions::MergeFrom(const EnumValueOptions& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValueOptions)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
@@ -8530,7 +8686,7 @@ void ServiceOptions::SetCachedSize(int size) const {
void ServiceOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.ServiceOptions)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -8545,12 +8701,12 @@ const char* ServiceOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional bool deprecated = 33 [default = false];
case 33:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_deprecated(&has_bits);
deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -8559,7 +8715,7 @@ const char* ServiceOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE
continue;
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
case 999:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
ptr -= 2;
do {
ptr += 2;
@@ -8599,10 +8755,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* ServiceOptions::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* ServiceOptions::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceOptions)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -8638,7 +8794,7 @@ size_t ServiceOptions::ByteSizeLong() const {
total_size += _extensions_.ByteSize();
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -8674,7 +8830,7 @@ void ServiceOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void ServiceOptions::MergeFrom(const ServiceOptions& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ServiceOptions)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
@@ -8782,7 +8938,7 @@ void MethodOptions::SetCachedSize(int size) const {
void MethodOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.MethodOptions)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -8802,12 +8958,12 @@ const char* MethodOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional bool deprecated = 33 [default = false];
case 33:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_deprecated(&has_bits);
deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -8816,8 +8972,8 @@ const char* MethodOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_
continue;
// optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];
case 34:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
- ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
+ uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel_IsValid(val))) {
_internal_set_idempotency_level(static_cast<::PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel>(val));
@@ -8829,7 +8985,7 @@ const char* MethodOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_
continue;
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
case 999:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
ptr -= 2;
do {
ptr += 2;
@@ -8869,10 +9025,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* MethodOptions::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* MethodOptions::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodOptions)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -8915,7 +9071,7 @@ size_t MethodOptions::ByteSizeLong() const {
total_size += _extensions_.ByteSize();
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -8959,7 +9115,7 @@ void MethodOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void MethodOptions::MergeFrom(const MethodOptions& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MethodOptions)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
@@ -9043,6 +9199,9 @@ UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOp
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_part_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_part_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name_part()) {
name_part_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name_part(),
GetArenaForAllocation());
@@ -9053,6 +9212,9 @@ UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOp
inline void UninterpretedOption_NamePart::SharedCtor() {
name_part_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_part_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
is_extension_ = false;
}
@@ -9080,7 +9242,7 @@ void UninterpretedOption_NamePart::SetCachedSize(int size) const {
void UninterpretedOption_NamePart::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.UninterpretedOption.NamePart)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -9097,12 +9259,12 @@ const char* UninterpretedOption_NamePart::_InternalParse(const char* ptr, ::PROT
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// required string name_part = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name_part();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -9114,7 +9276,7 @@ const char* UninterpretedOption_NamePart::_InternalParse(const char* ptr, ::PROT
continue;
// required bool is_extension = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_is_extension(&has_bits);
is_extension_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -9145,10 +9307,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* UninterpretedOption_NamePart::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* UninterpretedOption_NamePart::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption.NamePart)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
@@ -9210,7 +9372,7 @@ size_t UninterpretedOption_NamePart::ByteSizeLong() const {
} else {
total_size += RequiredFieldsByteSizeFallback();
}
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -9233,7 +9395,7 @@ void UninterpretedOption_NamePart::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* t
void UninterpretedOption_NamePart::MergeFrom(const UninterpretedOption_NamePart& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UninterpretedOption.NamePart)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
@@ -9322,16 +9484,25 @@ UninterpretedOption::UninterpretedOption(const UninterpretedOption& from)
name_(from.name_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
identifier_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ identifier_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_identifier_value()) {
identifier_value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_identifier_value(),
GetArenaForAllocation());
}
string_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ string_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_string_value()) {
string_value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_string_value(),
GetArenaForAllocation());
}
aggregate_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ aggregate_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_aggregate_value()) {
aggregate_value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_aggregate_value(),
GetArenaForAllocation());
@@ -9344,8 +9515,17 @@ UninterpretedOption::UninterpretedOption(const UninterpretedOption& from)
inline void UninterpretedOption::SharedCtor() {
identifier_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ identifier_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
string_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ string_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
aggregate_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ aggregate_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&positive_int_value_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&double_value_) -
@@ -9378,7 +9558,7 @@ void UninterpretedOption::SetCachedSize(int size) const {
void UninterpretedOption::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.UninterpretedOption)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -9408,12 +9588,12 @@ const char* UninterpretedOption::_InternalParse(const char* ptr, ::PROTOBUF_NAME
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
@@ -9426,7 +9606,7 @@ const char* UninterpretedOption::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// optional string identifier_value = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
auto str = _internal_mutable_identifier_value();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -9438,7 +9618,7 @@ const char* UninterpretedOption::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// optional uint64 positive_int_value = 4;
case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_positive_int_value(&has_bits);
positive_int_value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -9447,7 +9627,7 @@ const char* UninterpretedOption::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// optional int64 negative_int_value = 5;
case 5:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_Internal::set_has_negative_int_value(&has_bits);
negative_int_value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
@@ -9456,7 +9636,7 @@ const char* UninterpretedOption::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// optional double double_value = 6;
case 6:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 49)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 49)) {
_Internal::set_has_double_value(&has_bits);
double_value_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
ptr += sizeof(double);
@@ -9465,7 +9645,7 @@ const char* UninterpretedOption::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// optional bytes string_value = 7;
case 7:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
auto str = _internal_mutable_string_value();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
@@ -9474,7 +9654,7 @@ const char* UninterpretedOption::_InternalParse(const char* ptr, ::PROTOBUF_NAME
continue;
// optional string aggregate_value = 8;
case 8:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
auto str = _internal_mutable_aggregate_value();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -9508,10 +9688,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* UninterpretedOption::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* UninterpretedOption::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
@@ -9579,7 +9759,7 @@ size_t UninterpretedOption::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.UninterpretedOption)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -9648,7 +9828,7 @@ void UninterpretedOption::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void UninterpretedOption::MergeFrom(const UninterpretedOption& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UninterpretedOption)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
name_.MergeFrom(from.name_);
@@ -9758,11 +9938,17 @@ SourceCodeInfo_Location::SourceCodeInfo_Location(const SourceCodeInfo_Location&
leading_detached_comments_(from.leading_detached_comments_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
leading_comments_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ leading_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_leading_comments()) {
leading_comments_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_leading_comments(),
GetArenaForAllocation());
}
trailing_comments_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ trailing_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_trailing_comments()) {
trailing_comments_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_trailing_comments(),
GetArenaForAllocation());
@@ -9772,7 +9958,13 @@ SourceCodeInfo_Location::SourceCodeInfo_Location(const SourceCodeInfo_Location&
inline void SourceCodeInfo_Location::SharedCtor() {
leading_comments_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ leading_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
trailing_comments_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ trailing_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
SourceCodeInfo_Location::~SourceCodeInfo_Location() {
@@ -9800,7 +9992,7 @@ void SourceCodeInfo_Location::SetCachedSize(int size) const {
void SourceCodeInfo_Location::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.SourceCodeInfo.Location)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -9824,15 +10016,15 @@ const char* SourceCodeInfo_Location::_InternalParse(const char* ptr, ::PROTOBUF_
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated int32 path = 1 [packed = true];
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_path(), ptr, ctx);
CHK_(ptr);
- } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8) {
+ } else if (static_cast<uint8_t>(tag) == 8) {
_internal_add_path(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
} else
@@ -9840,10 +10032,10 @@ const char* SourceCodeInfo_Location::_InternalParse(const char* ptr, ::PROTOBUF_
continue;
// repeated int32 span = 2 [packed = true];
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_span(), ptr, ctx);
CHK_(ptr);
- } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) {
+ } else if (static_cast<uint8_t>(tag) == 16) {
_internal_add_span(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
} else
@@ -9851,7 +10043,7 @@ const char* SourceCodeInfo_Location::_InternalParse(const char* ptr, ::PROTOBUF_
continue;
// optional string leading_comments = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
auto str = _internal_mutable_leading_comments();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -9863,7 +10055,7 @@ const char* SourceCodeInfo_Location::_InternalParse(const char* ptr, ::PROTOBUF_
continue;
// optional string trailing_comments = 4;
case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
auto str = _internal_mutable_trailing_comments();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -9875,7 +10067,7 @@ const char* SourceCodeInfo_Location::_InternalParse(const char* ptr, ::PROTOBUF_
continue;
// repeated string leading_detached_comments = 6;
case 6:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
ptr -= 1;
do {
ptr += 1;
@@ -9914,10 +10106,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* SourceCodeInfo_Location::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* SourceCodeInfo_Location::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo.Location)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated int32 path = 1 [packed = true];
@@ -9981,7 +10173,7 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceCodeInfo.Location)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -9992,7 +10184,7 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const {
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
+ static_cast<int32_t>(data_size));
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
_path_cached_byte_size_.store(cached_size,
@@ -10007,7 +10199,7 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const {
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
+ static_cast<int32_t>(data_size));
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
_span_cached_byte_size_.store(cached_size,
@@ -10059,7 +10251,7 @@ void SourceCodeInfo_Location::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void SourceCodeInfo_Location::MergeFrom(const SourceCodeInfo_Location& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceCodeInfo.Location)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
path_.MergeFrom(from.path_);
@@ -10164,7 +10356,7 @@ void SourceCodeInfo::SetCachedSize(int size) const {
void SourceCodeInfo::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.SourceCodeInfo)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -10175,12 +10367,12 @@ void SourceCodeInfo::Clear() {
const char* SourceCodeInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated .google.protobuf.SourceCodeInfo.Location location = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr -= 1;
do {
ptr += 1;
@@ -10214,10 +10406,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* SourceCodeInfo::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* SourceCodeInfo::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated .google.protobuf.SourceCodeInfo.Location location = 1;
@@ -10240,7 +10432,7 @@ size_t SourceCodeInfo::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceCodeInfo)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -10270,7 +10462,7 @@ void SourceCodeInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void SourceCodeInfo::MergeFrom(const SourceCodeInfo& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceCodeInfo)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
location_.MergeFrom(from.location_);
@@ -10332,6 +10524,9 @@ GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(const GeneratedCodeIn
path_(from.path_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
source_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ source_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_source_file()) {
source_file_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_source_file(),
GetArenaForAllocation());
@@ -10344,6 +10539,9 @@ GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(const GeneratedCodeIn
inline void GeneratedCodeInfo_Annotation::SharedCtor() {
source_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ source_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&begin_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&end_) -
@@ -10374,7 +10572,7 @@ void GeneratedCodeInfo_Annotation::SetCachedSize(int size) const {
void GeneratedCodeInfo_Annotation::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.GeneratedCodeInfo.Annotation)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -10396,15 +10594,15 @@ const char* GeneratedCodeInfo_Annotation::_InternalParse(const char* ptr, ::PROT
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated int32 path = 1 [packed = true];
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_path(), ptr, ctx);
CHK_(ptr);
- } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8) {
+ } else if (static_cast<uint8_t>(tag) == 8) {
_internal_add_path(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
} else
@@ -10412,7 +10610,7 @@ const char* GeneratedCodeInfo_Annotation::_InternalParse(const char* ptr, ::PROT
continue;
// optional string source_file = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
auto str = _internal_mutable_source_file();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
@@ -10424,7 +10622,7 @@ const char* GeneratedCodeInfo_Annotation::_InternalParse(const char* ptr, ::PROT
continue;
// optional int32 begin = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_begin(&has_bits);
begin_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
@@ -10433,7 +10631,7 @@ const char* GeneratedCodeInfo_Annotation::_InternalParse(const char* ptr, ::PROT
continue;
// optional int32 end = 4;
case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_end(&has_bits);
end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
@@ -10464,10 +10662,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* GeneratedCodeInfo_Annotation::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* GeneratedCodeInfo_Annotation::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo.Annotation)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated int32 path = 1 [packed = true];
@@ -10514,7 +10712,7 @@ size_t GeneratedCodeInfo_Annotation::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.GeneratedCodeInfo.Annotation)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -10525,7 +10723,7 @@ size_t GeneratedCodeInfo_Annotation::ByteSizeLong() const {
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
+ static_cast<int32_t>(data_size));
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
_path_cached_byte_size_.store(cached_size,
@@ -10572,7 +10770,7 @@ void GeneratedCodeInfo_Annotation::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* t
void GeneratedCodeInfo_Annotation::MergeFrom(const GeneratedCodeInfo_Annotation& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.GeneratedCodeInfo.Annotation)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
path_.MergeFrom(from.path_);
@@ -10678,7 +10876,7 @@ void GeneratedCodeInfo::SetCachedSize(int size) const {
void GeneratedCodeInfo::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.GeneratedCodeInfo)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -10689,12 +10887,12 @@ void GeneratedCodeInfo::Clear() {
const char* GeneratedCodeInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr -= 1;
do {
ptr += 1;
@@ -10728,10 +10926,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* GeneratedCodeInfo::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* GeneratedCodeInfo::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
@@ -10754,7 +10952,7 @@ size_t GeneratedCodeInfo::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.GeneratedCodeInfo)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -10784,7 +10982,7 @@ void GeneratedCodeInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void GeneratedCodeInfo::MergeFrom(const GeneratedCodeInfo& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.GeneratedCodeInfo)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
annotation_.MergeFrom(from.annotation_);
diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h
index 65af9edb8..16a6c3b56 100644
--- a/src/google/protobuf/descriptor.pb.h
+++ b/src/google/protobuf/descriptor.pb.h
@@ -51,7 +51,7 @@ struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fdescriptor_2eproto {
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
- static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
+ static const uint32_t offsets[];
};
PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fdescriptor_2eproto;
PROTOBUF_NAMESPACE_OPEN
@@ -429,8 +429,8 @@ class PROTOBUF_EXPORT FileDescriptorSet final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -593,8 +593,8 @@ class PROTOBUF_EXPORT FileDescriptorProto final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -740,19 +740,19 @@ class PROTOBUF_EXPORT FileDescriptorProto final :
public:
void clear_public_dependency();
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_public_dependency(int index) const;
- const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
+ int32_t _internal_public_dependency(int index) const;
+ const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
_internal_public_dependency() const;
- void _internal_add_public_dependency(::PROTOBUF_NAMESPACE_ID::int32 value);
- ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
+ void _internal_add_public_dependency(int32_t value);
+ ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
_internal_mutable_public_dependency();
public:
- ::PROTOBUF_NAMESPACE_ID::int32 public_dependency(int index) const;
- void set_public_dependency(int index, ::PROTOBUF_NAMESPACE_ID::int32 value);
- void add_public_dependency(::PROTOBUF_NAMESPACE_ID::int32 value);
- const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
+ int32_t public_dependency(int index) const;
+ void set_public_dependency(int index, int32_t value);
+ void add_public_dependency(int32_t value);
+ const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
public_dependency() const;
- ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
+ ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
mutable_public_dependency();
// repeated int32 weak_dependency = 11;
@@ -762,19 +762,19 @@ class PROTOBUF_EXPORT FileDescriptorProto final :
public:
void clear_weak_dependency();
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_weak_dependency(int index) const;
- const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
+ int32_t _internal_weak_dependency(int index) const;
+ const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
_internal_weak_dependency() const;
- void _internal_add_weak_dependency(::PROTOBUF_NAMESPACE_ID::int32 value);
- ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
+ void _internal_add_weak_dependency(int32_t value);
+ ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
_internal_mutable_weak_dependency();
public:
- ::PROTOBUF_NAMESPACE_ID::int32 weak_dependency(int index) const;
- void set_weak_dependency(int index, ::PROTOBUF_NAMESPACE_ID::int32 value);
- void add_weak_dependency(::PROTOBUF_NAMESPACE_ID::int32 value);
- const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
+ int32_t weak_dependency(int index) const;
+ void set_weak_dependency(int index, int32_t value);
+ void add_weak_dependency(int32_t value);
+ const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
weak_dependency() const;
- ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
+ ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
mutable_weak_dependency();
// optional string name = 1;
@@ -881,8 +881,8 @@ class PROTOBUF_EXPORT FileDescriptorProto final :
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto > enum_type_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto > service_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto > extension_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 > public_dependency_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 > weak_dependency_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > public_dependency_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > weak_dependency_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr package_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr syntax_;
@@ -992,8 +992,8 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -1051,11 +1051,11 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final :
bool _internal_has_start() const;
public:
void clear_start();
- ::PROTOBUF_NAMESPACE_ID::int32 start() const;
- void set_start(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t start() const;
+ void set_start(int32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_start() const;
- void _internal_set_start(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t _internal_start() const;
+ void _internal_set_start(int32_t value);
public:
// optional int32 end = 2;
@@ -1064,11 +1064,11 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final :
bool _internal_has_end() const;
public:
void clear_end();
- ::PROTOBUF_NAMESPACE_ID::int32 end() const;
- void set_end(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t end() const;
+ void set_end(int32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_end() const;
- void _internal_set_end(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t _internal_end() const;
+ void _internal_set_end(int32_t value);
public:
// @@protoc_insertion_point(class_scope:google.protobuf.DescriptorProto.ExtensionRange)
@@ -1081,8 +1081,8 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final :
::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* options_;
- ::PROTOBUF_NAMESPACE_ID::int32 start_;
- ::PROTOBUF_NAMESPACE_ID::int32 end_;
+ int32_t start_;
+ int32_t end_;
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -1187,8 +1187,8 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -1227,11 +1227,11 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final :
bool _internal_has_start() const;
public:
void clear_start();
- ::PROTOBUF_NAMESPACE_ID::int32 start() const;
- void set_start(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t start() const;
+ void set_start(int32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_start() const;
- void _internal_set_start(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t _internal_start() const;
+ void _internal_set_start(int32_t value);
public:
// optional int32 end = 2;
@@ -1240,11 +1240,11 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final :
bool _internal_has_end() const;
public:
void clear_end();
- ::PROTOBUF_NAMESPACE_ID::int32 end() const;
- void set_end(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t end() const;
+ void set_end(int32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_end() const;
- void _internal_set_end(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t _internal_end() const;
+ void _internal_set_end(int32_t value);
public:
// @@protoc_insertion_point(class_scope:google.protobuf.DescriptorProto.ReservedRange)
@@ -1256,8 +1256,8 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final :
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::int32 start_;
- ::PROTOBUF_NAMESPACE_ID::int32 end_;
+ int32_t start_;
+ int32_t end_;
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -1362,8 +1362,8 @@ class PROTOBUF_EXPORT DescriptorProto final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -1716,8 +1716,8 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -2072,8 +2072,8 @@ class PROTOBUF_EXPORT FieldDescriptorProto final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -2323,11 +2323,11 @@ class PROTOBUF_EXPORT FieldDescriptorProto final :
bool _internal_has_number() const;
public:
void clear_number();
- ::PROTOBUF_NAMESPACE_ID::int32 number() const;
- void set_number(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t number() const;
+ void set_number(int32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_number() const;
- void _internal_set_number(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t _internal_number() const;
+ void _internal_set_number(int32_t value);
public:
// optional int32 oneof_index = 9;
@@ -2336,11 +2336,11 @@ class PROTOBUF_EXPORT FieldDescriptorProto final :
bool _internal_has_oneof_index() const;
public:
void clear_oneof_index();
- ::PROTOBUF_NAMESPACE_ID::int32 oneof_index() const;
- void set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t oneof_index() const;
+ void set_oneof_index(int32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_oneof_index() const;
- void _internal_set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t _internal_oneof_index() const;
+ void _internal_set_oneof_index(int32_t value);
public:
// optional bool proto3_optional = 17;
@@ -2397,8 +2397,8 @@ class PROTOBUF_EXPORT FieldDescriptorProto final :
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr default_value_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr json_name_;
::PROTOBUF_NAMESPACE_ID::FieldOptions* options_;
- ::PROTOBUF_NAMESPACE_ID::int32 number_;
- ::PROTOBUF_NAMESPACE_ID::int32 oneof_index_;
+ int32_t number_;
+ int32_t oneof_index_;
bool proto3_optional_;
int label_;
int type_;
@@ -2506,8 +2506,8 @@ class PROTOBUF_EXPORT OneofDescriptorProto final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -2691,8 +2691,8 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -2731,11 +2731,11 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final :
bool _internal_has_start() const;
public:
void clear_start();
- ::PROTOBUF_NAMESPACE_ID::int32 start() const;
- void set_start(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t start() const;
+ void set_start(int32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_start() const;
- void _internal_set_start(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t _internal_start() const;
+ void _internal_set_start(int32_t value);
public:
// optional int32 end = 2;
@@ -2744,11 +2744,11 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final :
bool _internal_has_end() const;
public:
void clear_end();
- ::PROTOBUF_NAMESPACE_ID::int32 end() const;
- void set_end(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t end() const;
+ void set_end(int32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_end() const;
- void _internal_set_end(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t _internal_end() const;
+ void _internal_set_end(int32_t value);
public:
// @@protoc_insertion_point(class_scope:google.protobuf.EnumDescriptorProto.EnumReservedRange)
@@ -2760,8 +2760,8 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final :
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::int32 start_;
- ::PROTOBUF_NAMESPACE_ID::int32 end_;
+ int32_t start_;
+ int32_t end_;
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -2866,8 +2866,8 @@ class PROTOBUF_EXPORT EnumDescriptorProto final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -3119,8 +3119,8 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -3196,11 +3196,11 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final :
bool _internal_has_number() const;
public:
void clear_number();
- ::PROTOBUF_NAMESPACE_ID::int32 number() const;
- void set_number(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t number() const;
+ void set_number(int32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_number() const;
- void _internal_set_number(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t _internal_number() const;
+ void _internal_set_number(int32_t value);
public:
// @@protoc_insertion_point(class_scope:google.protobuf.EnumValueDescriptorProto)
@@ -3214,7 +3214,7 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final :
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
::PROTOBUF_NAMESPACE_ID::EnumValueOptions* options_;
- ::PROTOBUF_NAMESPACE_ID::int32 number_;
+ int32_t number_;
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -3319,8 +3319,8 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -3524,8 +3524,8 @@ class PROTOBUF_EXPORT MethodDescriptorProto final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -3779,8 +3779,8 @@ class PROTOBUF_EXPORT FileOptions final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -4518,8 +4518,8 @@ class PROTOBUF_EXPORT MessageOptions final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -4935,8 +4935,8 @@ class PROTOBUF_EXPORT FieldOptions final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -5446,8 +5446,8 @@ class PROTOBUF_EXPORT OneofOptions final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -5802,8 +5802,8 @@ class PROTOBUF_EXPORT EnumOptions final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -6189,8 +6189,8 @@ class PROTOBUF_EXPORT EnumValueOptions final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -6561,8 +6561,8 @@ class PROTOBUF_EXPORT ServiceOptions final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -6933,8 +6933,8 @@ class PROTOBUF_EXPORT MethodOptions final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -7352,8 +7352,8 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -7535,8 +7535,8 @@ class PROTOBUF_EXPORT UninterpretedOption final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -7654,11 +7654,11 @@ class PROTOBUF_EXPORT UninterpretedOption final :
bool _internal_has_positive_int_value() const;
public:
void clear_positive_int_value();
- ::PROTOBUF_NAMESPACE_ID::uint64 positive_int_value() const;
- void set_positive_int_value(::PROTOBUF_NAMESPACE_ID::uint64 value);
+ uint64_t positive_int_value() const;
+ void set_positive_int_value(uint64_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::uint64 _internal_positive_int_value() const;
- void _internal_set_positive_int_value(::PROTOBUF_NAMESPACE_ID::uint64 value);
+ uint64_t _internal_positive_int_value() const;
+ void _internal_set_positive_int_value(uint64_t value);
public:
// optional int64 negative_int_value = 5;
@@ -7667,11 +7667,11 @@ class PROTOBUF_EXPORT UninterpretedOption final :
bool _internal_has_negative_int_value() const;
public:
void clear_negative_int_value();
- ::PROTOBUF_NAMESPACE_ID::int64 negative_int_value() const;
- void set_negative_int_value(::PROTOBUF_NAMESPACE_ID::int64 value);
+ int64_t negative_int_value() const;
+ void set_negative_int_value(int64_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int64 _internal_negative_int_value() const;
- void _internal_set_negative_int_value(::PROTOBUF_NAMESPACE_ID::int64 value);
+ int64_t _internal_negative_int_value() const;
+ void _internal_set_negative_int_value(int64_t value);
public:
// optional double double_value = 6;
@@ -7700,8 +7700,8 @@ class PROTOBUF_EXPORT UninterpretedOption final :
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr identifier_value_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr string_value_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr aggregate_value_;
- ::PROTOBUF_NAMESPACE_ID::uint64 positive_int_value_;
- ::PROTOBUF_NAMESPACE_ID::int64 negative_int_value_;
+ uint64_t positive_int_value_;
+ int64_t negative_int_value_;
double double_value_;
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
@@ -7807,8 +7807,8 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -7851,19 +7851,19 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final :
public:
void clear_path();
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_path(int index) const;
- const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
+ int32_t _internal_path(int index) const;
+ const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
_internal_path() const;
- void _internal_add_path(::PROTOBUF_NAMESPACE_ID::int32 value);
- ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
+ void _internal_add_path(int32_t value);
+ ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
_internal_mutable_path();
public:
- ::PROTOBUF_NAMESPACE_ID::int32 path(int index) const;
- void set_path(int index, ::PROTOBUF_NAMESPACE_ID::int32 value);
- void add_path(::PROTOBUF_NAMESPACE_ID::int32 value);
- const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
+ int32_t path(int index) const;
+ void set_path(int index, int32_t value);
+ void add_path(int32_t value);
+ const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
path() const;
- ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
+ ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
mutable_path();
// repeated int32 span = 2 [packed = true];
@@ -7873,19 +7873,19 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final :
public:
void clear_span();
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_span(int index) const;
- const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
+ int32_t _internal_span(int index) const;
+ const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
_internal_span() const;
- void _internal_add_span(::PROTOBUF_NAMESPACE_ID::int32 value);
- ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
+ void _internal_add_span(int32_t value);
+ ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
_internal_mutable_span();
public:
- ::PROTOBUF_NAMESPACE_ID::int32 span(int index) const;
- void set_span(int index, ::PROTOBUF_NAMESPACE_ID::int32 value);
- void add_span(::PROTOBUF_NAMESPACE_ID::int32 value);
- const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
+ int32_t span(int index) const;
+ void set_span(int index, int32_t value);
+ void add_span(int32_t value);
+ const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
span() const;
- ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
+ ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
mutable_span();
// repeated string leading_detached_comments = 6;
@@ -7957,9 +7957,9 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final :
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 > path_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > path_;
mutable std::atomic<int> _path_cached_byte_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 > span_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > span_;
mutable std::atomic<int> _span_cached_byte_size_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string> leading_detached_comments_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr leading_comments_;
@@ -8068,8 +8068,8 @@ class PROTOBUF_EXPORT SourceCodeInfo final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -8234,8 +8234,8 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -8277,19 +8277,19 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final :
public:
void clear_path();
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_path(int index) const;
- const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
+ int32_t _internal_path(int index) const;
+ const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
_internal_path() const;
- void _internal_add_path(::PROTOBUF_NAMESPACE_ID::int32 value);
- ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
+ void _internal_add_path(int32_t value);
+ ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
_internal_mutable_path();
public:
- ::PROTOBUF_NAMESPACE_ID::int32 path(int index) const;
- void set_path(int index, ::PROTOBUF_NAMESPACE_ID::int32 value);
- void add_path(::PROTOBUF_NAMESPACE_ID::int32 value);
- const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
+ int32_t path(int index) const;
+ void set_path(int index, int32_t value);
+ void add_path(int32_t value);
+ const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
path() const;
- ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
+ ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
mutable_path();
// optional string source_file = 2;
@@ -8316,11 +8316,11 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final :
bool _internal_has_begin() const;
public:
void clear_begin();
- ::PROTOBUF_NAMESPACE_ID::int32 begin() const;
- void set_begin(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t begin() const;
+ void set_begin(int32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_begin() const;
- void _internal_set_begin(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t _internal_begin() const;
+ void _internal_set_begin(int32_t value);
public:
// optional int32 end = 4;
@@ -8329,11 +8329,11 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final :
bool _internal_has_end() const;
public:
void clear_end();
- ::PROTOBUF_NAMESPACE_ID::int32 end() const;
- void set_end(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t end() const;
+ void set_end(int32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_end() const;
- void _internal_set_end(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t _internal_end() const;
+ void _internal_set_end(int32_t value);
public:
// @@protoc_insertion_point(class_scope:google.protobuf.GeneratedCodeInfo.Annotation)
@@ -8345,11 +8345,11 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final :
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 > path_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > path_;
mutable std::atomic<int> _path_cached_byte_size_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr source_file_;
- ::PROTOBUF_NAMESPACE_ID::int32 begin_;
- ::PROTOBUF_NAMESPACE_ID::int32 end_;
+ int32_t begin_;
+ int32_t end_;
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -8454,8 +8454,8 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -8619,6 +8619,11 @@ inline std::string* FileDescriptorProto::release_name() {
}
_has_bits_[0] &= ~0x00000001u;
return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void FileDescriptorProto::set_allocated_name(std::string* name) {
if (name != nullptr) {
@@ -8628,6 +8633,11 @@ inline void FileDescriptorProto::set_allocated_name(std::string* name) {
}
name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.name)
}
@@ -8677,6 +8687,11 @@ inline std::string* FileDescriptorProto::release_package() {
}
_has_bits_[0] &= ~0x00000002u;
return package_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (package_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void FileDescriptorProto::set_allocated_package(std::string* package) {
if (package != nullptr) {
@@ -8686,6 +8701,11 @@ inline void FileDescriptorProto::set_allocated_package(std::string* package) {
}
package_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), package,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (package_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.package)
}
@@ -8774,38 +8794,38 @@ inline int FileDescriptorProto::public_dependency_size() const {
inline void FileDescriptorProto::clear_public_dependency() {
public_dependency_.Clear();
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 FileDescriptorProto::_internal_public_dependency(int index) const {
+inline int32_t FileDescriptorProto::_internal_public_dependency(int index) const {
return public_dependency_.Get(index);
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 FileDescriptorProto::public_dependency(int index) const {
+inline int32_t FileDescriptorProto::public_dependency(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.public_dependency)
return _internal_public_dependency(index);
}
-inline void FileDescriptorProto::set_public_dependency(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void FileDescriptorProto::set_public_dependency(int index, int32_t value) {
public_dependency_.Set(index, value);
// @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.public_dependency)
}
-inline void FileDescriptorProto::_internal_add_public_dependency(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void FileDescriptorProto::_internal_add_public_dependency(int32_t value) {
public_dependency_.Add(value);
}
-inline void FileDescriptorProto::add_public_dependency(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void FileDescriptorProto::add_public_dependency(int32_t value) {
_internal_add_public_dependency(value);
// @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.public_dependency)
}
-inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
+inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
FileDescriptorProto::_internal_public_dependency() const {
return public_dependency_;
}
-inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
+inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
FileDescriptorProto::public_dependency() const {
// @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.public_dependency)
return _internal_public_dependency();
}
-inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
+inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
FileDescriptorProto::_internal_mutable_public_dependency() {
return &public_dependency_;
}
-inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
+inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
FileDescriptorProto::mutable_public_dependency() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.public_dependency)
return _internal_mutable_public_dependency();
@@ -8821,38 +8841,38 @@ inline int FileDescriptorProto::weak_dependency_size() const {
inline void FileDescriptorProto::clear_weak_dependency() {
weak_dependency_.Clear();
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 FileDescriptorProto::_internal_weak_dependency(int index) const {
+inline int32_t FileDescriptorProto::_internal_weak_dependency(int index) const {
return weak_dependency_.Get(index);
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 FileDescriptorProto::weak_dependency(int index) const {
+inline int32_t FileDescriptorProto::weak_dependency(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.weak_dependency)
return _internal_weak_dependency(index);
}
-inline void FileDescriptorProto::set_weak_dependency(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void FileDescriptorProto::set_weak_dependency(int index, int32_t value) {
weak_dependency_.Set(index, value);
// @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.weak_dependency)
}
-inline void FileDescriptorProto::_internal_add_weak_dependency(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void FileDescriptorProto::_internal_add_weak_dependency(int32_t value) {
weak_dependency_.Add(value);
}
-inline void FileDescriptorProto::add_weak_dependency(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void FileDescriptorProto::add_weak_dependency(int32_t value) {
_internal_add_weak_dependency(value);
// @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.weak_dependency)
}
-inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
+inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
FileDescriptorProto::_internal_weak_dependency() const {
return weak_dependency_;
}
-inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
+inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
FileDescriptorProto::weak_dependency() const {
// @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.weak_dependency)
return _internal_weak_dependency();
}
-inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
+inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
FileDescriptorProto::_internal_mutable_weak_dependency() {
return &weak_dependency_;
}
-inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
+inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
FileDescriptorProto::mutable_weak_dependency() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.weak_dependency)
return _internal_mutable_weak_dependency();
@@ -9244,6 +9264,11 @@ inline std::string* FileDescriptorProto::release_syntax() {
}
_has_bits_[0] &= ~0x00000004u;
return syntax_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (syntax_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ syntax_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void FileDescriptorProto::set_allocated_syntax(std::string* syntax) {
if (syntax != nullptr) {
@@ -9253,6 +9278,11 @@ inline void FileDescriptorProto::set_allocated_syntax(std::string* syntax) {
}
syntax_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), syntax,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (syntax_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ syntax_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.syntax)
}
@@ -9272,18 +9302,18 @@ inline void DescriptorProto_ExtensionRange::clear_start() {
start_ = 0;
_has_bits_[0] &= ~0x00000002u;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ExtensionRange::_internal_start() const {
+inline int32_t DescriptorProto_ExtensionRange::_internal_start() const {
return start_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ExtensionRange::start() const {
+inline int32_t DescriptorProto_ExtensionRange::start() const {
// @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.start)
return _internal_start();
}
-inline void DescriptorProto_ExtensionRange::_internal_set_start(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void DescriptorProto_ExtensionRange::_internal_set_start(int32_t value) {
_has_bits_[0] |= 0x00000002u;
start_ = value;
}
-inline void DescriptorProto_ExtensionRange::set_start(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void DescriptorProto_ExtensionRange::set_start(int32_t value) {
_internal_set_start(value);
// @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ExtensionRange.start)
}
@@ -9300,18 +9330,18 @@ inline void DescriptorProto_ExtensionRange::clear_end() {
end_ = 0;
_has_bits_[0] &= ~0x00000004u;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ExtensionRange::_internal_end() const {
+inline int32_t DescriptorProto_ExtensionRange::_internal_end() const {
return end_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ExtensionRange::end() const {
+inline int32_t DescriptorProto_ExtensionRange::end() const {
// @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.end)
return _internal_end();
}
-inline void DescriptorProto_ExtensionRange::_internal_set_end(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void DescriptorProto_ExtensionRange::_internal_set_end(int32_t value) {
_has_bits_[0] |= 0x00000004u;
end_ = value;
}
-inline void DescriptorProto_ExtensionRange::set_end(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void DescriptorProto_ExtensionRange::set_end(int32_t value) {
_internal_set_end(value);
// @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ExtensionRange.end)
}
@@ -9422,18 +9452,18 @@ inline void DescriptorProto_ReservedRange::clear_start() {
start_ = 0;
_has_bits_[0] &= ~0x00000001u;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ReservedRange::_internal_start() const {
+inline int32_t DescriptorProto_ReservedRange::_internal_start() const {
return start_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ReservedRange::start() const {
+inline int32_t DescriptorProto_ReservedRange::start() const {
// @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.start)
return _internal_start();
}
-inline void DescriptorProto_ReservedRange::_internal_set_start(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void DescriptorProto_ReservedRange::_internal_set_start(int32_t value) {
_has_bits_[0] |= 0x00000001u;
start_ = value;
}
-inline void DescriptorProto_ReservedRange::set_start(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void DescriptorProto_ReservedRange::set_start(int32_t value) {
_internal_set_start(value);
// @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ReservedRange.start)
}
@@ -9450,18 +9480,18 @@ inline void DescriptorProto_ReservedRange::clear_end() {
end_ = 0;
_has_bits_[0] &= ~0x00000002u;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ReservedRange::_internal_end() const {
+inline int32_t DescriptorProto_ReservedRange::_internal_end() const {
return end_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ReservedRange::end() const {
+inline int32_t DescriptorProto_ReservedRange::end() const {
// @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.end)
return _internal_end();
}
-inline void DescriptorProto_ReservedRange::_internal_set_end(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void DescriptorProto_ReservedRange::_internal_set_end(int32_t value) {
_has_bits_[0] |= 0x00000002u;
end_ = value;
}
-inline void DescriptorProto_ReservedRange::set_end(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void DescriptorProto_ReservedRange::set_end(int32_t value) {
_internal_set_end(value);
// @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ReservedRange.end)
}
@@ -9516,6 +9546,11 @@ inline std::string* DescriptorProto::release_name() {
}
_has_bits_[0] &= ~0x00000001u;
return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void DescriptorProto::set_allocated_name(std::string* name) {
if (name != nullptr) {
@@ -9525,6 +9560,11 @@ inline void DescriptorProto::set_allocated_name(std::string* name) {
}
name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.name)
}
@@ -10067,6 +10107,11 @@ inline std::string* FieldDescriptorProto::release_name() {
}
_has_bits_[0] &= ~0x00000001u;
return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void FieldDescriptorProto::set_allocated_name(std::string* name) {
if (name != nullptr) {
@@ -10076,6 +10121,11 @@ inline void FieldDescriptorProto::set_allocated_name(std::string* name) {
}
name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.name)
}
@@ -10091,18 +10141,18 @@ inline void FieldDescriptorProto::clear_number() {
number_ = 0;
_has_bits_[0] &= ~0x00000040u;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 FieldDescriptorProto::_internal_number() const {
+inline int32_t FieldDescriptorProto::_internal_number() const {
return number_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 FieldDescriptorProto::number() const {
+inline int32_t FieldDescriptorProto::number() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.number)
return _internal_number();
}
-inline void FieldDescriptorProto::_internal_set_number(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void FieldDescriptorProto::_internal_set_number(int32_t value) {
_has_bits_[0] |= 0x00000040u;
number_ = value;
}
-inline void FieldDescriptorProto::set_number(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void FieldDescriptorProto::set_number(int32_t value) {
_internal_set_number(value);
// @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.number)
}
@@ -10211,6 +10261,11 @@ inline std::string* FieldDescriptorProto::release_type_name() {
}
_has_bits_[0] &= ~0x00000004u;
return type_name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (type_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void FieldDescriptorProto::set_allocated_type_name(std::string* type_name) {
if (type_name != nullptr) {
@@ -10220,6 +10275,11 @@ inline void FieldDescriptorProto::set_allocated_type_name(std::string* type_name
}
type_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), type_name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (type_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.type_name)
}
@@ -10269,6 +10329,11 @@ inline std::string* FieldDescriptorProto::release_extendee() {
}
_has_bits_[0] &= ~0x00000002u;
return extendee_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (extendee_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ extendee_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void FieldDescriptorProto::set_allocated_extendee(std::string* extendee) {
if (extendee != nullptr) {
@@ -10278,6 +10343,11 @@ inline void FieldDescriptorProto::set_allocated_extendee(std::string* extendee)
}
extendee_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), extendee,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (extendee_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ extendee_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.extendee)
}
@@ -10327,6 +10397,11 @@ inline std::string* FieldDescriptorProto::release_default_value() {
}
_has_bits_[0] &= ~0x00000008u;
return default_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (default_value_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void FieldDescriptorProto::set_allocated_default_value(std::string* default_value) {
if (default_value != nullptr) {
@@ -10336,6 +10411,11 @@ inline void FieldDescriptorProto::set_allocated_default_value(std::string* defau
}
default_value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), default_value,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (default_value_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.default_value)
}
@@ -10351,18 +10431,18 @@ inline void FieldDescriptorProto::clear_oneof_index() {
oneof_index_ = 0;
_has_bits_[0] &= ~0x00000080u;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 FieldDescriptorProto::_internal_oneof_index() const {
+inline int32_t FieldDescriptorProto::_internal_oneof_index() const {
return oneof_index_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 FieldDescriptorProto::oneof_index() const {
+inline int32_t FieldDescriptorProto::oneof_index() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.oneof_index)
return _internal_oneof_index();
}
-inline void FieldDescriptorProto::_internal_set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void FieldDescriptorProto::_internal_set_oneof_index(int32_t value) {
_has_bits_[0] |= 0x00000080u;
oneof_index_ = value;
}
-inline void FieldDescriptorProto::set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void FieldDescriptorProto::set_oneof_index(int32_t value) {
_internal_set_oneof_index(value);
// @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.oneof_index)
}
@@ -10413,6 +10493,11 @@ inline std::string* FieldDescriptorProto::release_json_name() {
}
_has_bits_[0] &= ~0x00000010u;
return json_name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (json_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void FieldDescriptorProto::set_allocated_json_name(std::string* json_name) {
if (json_name != nullptr) {
@@ -10422,6 +10507,11 @@ inline void FieldDescriptorProto::set_allocated_json_name(std::string* json_name
}
json_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), json_name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (json_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.json_name)
}
@@ -10593,6 +10683,11 @@ inline std::string* OneofDescriptorProto::release_name() {
}
_has_bits_[0] &= ~0x00000001u;
return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void OneofDescriptorProto::set_allocated_name(std::string* name) {
if (name != nullptr) {
@@ -10602,6 +10697,11 @@ inline void OneofDescriptorProto::set_allocated_name(std::string* name) {
}
name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.OneofDescriptorProto.name)
}
@@ -10711,18 +10811,18 @@ inline void EnumDescriptorProto_EnumReservedRange::clear_start() {
start_ = 0;
_has_bits_[0] &= ~0x00000001u;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 EnumDescriptorProto_EnumReservedRange::_internal_start() const {
+inline int32_t EnumDescriptorProto_EnumReservedRange::_internal_start() const {
return start_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 EnumDescriptorProto_EnumReservedRange::start() const {
+inline int32_t EnumDescriptorProto_EnumReservedRange::start() const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.EnumReservedRange.start)
return _internal_start();
}
-inline void EnumDescriptorProto_EnumReservedRange::_internal_set_start(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void EnumDescriptorProto_EnumReservedRange::_internal_set_start(int32_t value) {
_has_bits_[0] |= 0x00000001u;
start_ = value;
}
-inline void EnumDescriptorProto_EnumReservedRange::set_start(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void EnumDescriptorProto_EnumReservedRange::set_start(int32_t value) {
_internal_set_start(value);
// @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.EnumReservedRange.start)
}
@@ -10739,18 +10839,18 @@ inline void EnumDescriptorProto_EnumReservedRange::clear_end() {
end_ = 0;
_has_bits_[0] &= ~0x00000002u;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 EnumDescriptorProto_EnumReservedRange::_internal_end() const {
+inline int32_t EnumDescriptorProto_EnumReservedRange::_internal_end() const {
return end_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 EnumDescriptorProto_EnumReservedRange::end() const {
+inline int32_t EnumDescriptorProto_EnumReservedRange::end() const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.EnumReservedRange.end)
return _internal_end();
}
-inline void EnumDescriptorProto_EnumReservedRange::_internal_set_end(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void EnumDescriptorProto_EnumReservedRange::_internal_set_end(int32_t value) {
_has_bits_[0] |= 0x00000002u;
end_ = value;
}
-inline void EnumDescriptorProto_EnumReservedRange::set_end(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void EnumDescriptorProto_EnumReservedRange::set_end(int32_t value) {
_internal_set_end(value);
// @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.EnumReservedRange.end)
}
@@ -10805,6 +10905,11 @@ inline std::string* EnumDescriptorProto::release_name() {
}
_has_bits_[0] &= ~0x00000001u;
return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void EnumDescriptorProto::set_allocated_name(std::string* name) {
if (name != nullptr) {
@@ -10814,6 +10919,11 @@ inline void EnumDescriptorProto::set_allocated_name(std::string* name) {
}
name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.name)
}
@@ -11112,6 +11222,11 @@ inline std::string* EnumValueDescriptorProto::release_name() {
}
_has_bits_[0] &= ~0x00000001u;
return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void EnumValueDescriptorProto::set_allocated_name(std::string* name) {
if (name != nullptr) {
@@ -11121,6 +11236,11 @@ inline void EnumValueDescriptorProto::set_allocated_name(std::string* name) {
}
name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.name)
}
@@ -11136,18 +11256,18 @@ inline void EnumValueDescriptorProto::clear_number() {
number_ = 0;
_has_bits_[0] &= ~0x00000004u;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 EnumValueDescriptorProto::_internal_number() const {
+inline int32_t EnumValueDescriptorProto::_internal_number() const {
return number_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 EnumValueDescriptorProto::number() const {
+inline int32_t EnumValueDescriptorProto::number() const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.number)
return _internal_number();
}
-inline void EnumValueDescriptorProto::_internal_set_number(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void EnumValueDescriptorProto::_internal_set_number(int32_t value) {
_has_bits_[0] |= 0x00000004u;
number_ = value;
}
-inline void EnumValueDescriptorProto::set_number(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void EnumValueDescriptorProto::set_number(int32_t value) {
_internal_set_number(value);
// @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.number)
}
@@ -11292,6 +11412,11 @@ inline std::string* ServiceDescriptorProto::release_name() {
}
_has_bits_[0] &= ~0x00000001u;
return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void ServiceDescriptorProto::set_allocated_name(std::string* name) {
if (name != nullptr) {
@@ -11301,6 +11426,11 @@ inline void ServiceDescriptorProto::set_allocated_name(std::string* name) {
}
name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.name)
}
@@ -11484,6 +11614,11 @@ inline std::string* MethodDescriptorProto::release_name() {
}
_has_bits_[0] &= ~0x00000001u;
return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void MethodDescriptorProto::set_allocated_name(std::string* name) {
if (name != nullptr) {
@@ -11493,6 +11628,11 @@ inline void MethodDescriptorProto::set_allocated_name(std::string* name) {
}
name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.name)
}
@@ -11542,6 +11682,11 @@ inline std::string* MethodDescriptorProto::release_input_type() {
}
_has_bits_[0] &= ~0x00000002u;
return input_type_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (input_type_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ input_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void MethodDescriptorProto::set_allocated_input_type(std::string* input_type) {
if (input_type != nullptr) {
@@ -11551,6 +11696,11 @@ inline void MethodDescriptorProto::set_allocated_input_type(std::string* input_t
}
input_type_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), input_type,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (input_type_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ input_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.input_type)
}
@@ -11600,6 +11750,11 @@ inline std::string* MethodDescriptorProto::release_output_type() {
}
_has_bits_[0] &= ~0x00000004u;
return output_type_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (output_type_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ output_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void MethodDescriptorProto::set_allocated_output_type(std::string* output_type) {
if (output_type != nullptr) {
@@ -11609,6 +11764,11 @@ inline void MethodDescriptorProto::set_allocated_output_type(std::string* output
}
output_type_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), output_type,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (output_type_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ output_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.output_type)
}
@@ -11808,6 +11968,11 @@ inline std::string* FileOptions::release_java_package() {
}
_has_bits_[0] &= ~0x00000001u;
return java_package_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (java_package_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ java_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void FileOptions::set_allocated_java_package(std::string* java_package) {
if (java_package != nullptr) {
@@ -11817,6 +11982,11 @@ inline void FileOptions::set_allocated_java_package(std::string* java_package) {
}
java_package_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), java_package,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (java_package_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ java_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_package)
}
@@ -11866,6 +12036,11 @@ inline std::string* FileOptions::release_java_outer_classname() {
}
_has_bits_[0] &= ~0x00000002u;
return java_outer_classname_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (java_outer_classname_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ java_outer_classname_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void FileOptions::set_allocated_java_outer_classname(std::string* java_outer_classname) {
if (java_outer_classname != nullptr) {
@@ -11875,6 +12050,11 @@ inline void FileOptions::set_allocated_java_outer_classname(std::string* java_ou
}
java_outer_classname_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), java_outer_classname,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (java_outer_classname_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ java_outer_classname_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_outer_classname)
}
@@ -12037,6 +12217,11 @@ inline std::string* FileOptions::release_go_package() {
}
_has_bits_[0] &= ~0x00000004u;
return go_package_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (go_package_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ go_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void FileOptions::set_allocated_go_package(std::string* go_package) {
if (go_package != nullptr) {
@@ -12046,6 +12231,11 @@ inline void FileOptions::set_allocated_go_package(std::string* go_package) {
}
go_package_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), go_package,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (go_package_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ go_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.go_package)
}
@@ -12263,6 +12453,11 @@ inline std::string* FileOptions::release_objc_class_prefix() {
}
_has_bits_[0] &= ~0x00000008u;
return objc_class_prefix_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (objc_class_prefix_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ objc_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void FileOptions::set_allocated_objc_class_prefix(std::string* objc_class_prefix) {
if (objc_class_prefix != nullptr) {
@@ -12272,6 +12467,11 @@ inline void FileOptions::set_allocated_objc_class_prefix(std::string* objc_class
}
objc_class_prefix_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), objc_class_prefix,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (objc_class_prefix_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ objc_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.objc_class_prefix)
}
@@ -12321,6 +12521,11 @@ inline std::string* FileOptions::release_csharp_namespace() {
}
_has_bits_[0] &= ~0x00000010u;
return csharp_namespace_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (csharp_namespace_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ csharp_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void FileOptions::set_allocated_csharp_namespace(std::string* csharp_namespace) {
if (csharp_namespace != nullptr) {
@@ -12330,6 +12535,11 @@ inline void FileOptions::set_allocated_csharp_namespace(std::string* csharp_name
}
csharp_namespace_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), csharp_namespace,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (csharp_namespace_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ csharp_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.csharp_namespace)
}
@@ -12379,6 +12589,11 @@ inline std::string* FileOptions::release_swift_prefix() {
}
_has_bits_[0] &= ~0x00000020u;
return swift_prefix_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (swift_prefix_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ swift_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void FileOptions::set_allocated_swift_prefix(std::string* swift_prefix) {
if (swift_prefix != nullptr) {
@@ -12388,6 +12603,11 @@ inline void FileOptions::set_allocated_swift_prefix(std::string* swift_prefix) {
}
swift_prefix_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), swift_prefix,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (swift_prefix_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ swift_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.swift_prefix)
}
@@ -12437,6 +12657,11 @@ inline std::string* FileOptions::release_php_class_prefix() {
}
_has_bits_[0] &= ~0x00000040u;
return php_class_prefix_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (php_class_prefix_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ php_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void FileOptions::set_allocated_php_class_prefix(std::string* php_class_prefix) {
if (php_class_prefix != nullptr) {
@@ -12446,6 +12671,11 @@ inline void FileOptions::set_allocated_php_class_prefix(std::string* php_class_p
}
php_class_prefix_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), php_class_prefix,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (php_class_prefix_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ php_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.php_class_prefix)
}
@@ -12495,6 +12725,11 @@ inline std::string* FileOptions::release_php_namespace() {
}
_has_bits_[0] &= ~0x00000080u;
return php_namespace_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (php_namespace_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ php_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void FileOptions::set_allocated_php_namespace(std::string* php_namespace) {
if (php_namespace != nullptr) {
@@ -12504,6 +12739,11 @@ inline void FileOptions::set_allocated_php_namespace(std::string* php_namespace)
}
php_namespace_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), php_namespace,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (php_namespace_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ php_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.php_namespace)
}
@@ -12553,6 +12793,11 @@ inline std::string* FileOptions::release_php_metadata_namespace() {
}
_has_bits_[0] &= ~0x00000100u;
return php_metadata_namespace_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (php_metadata_namespace_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ php_metadata_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void FileOptions::set_allocated_php_metadata_namespace(std::string* php_metadata_namespace) {
if (php_metadata_namespace != nullptr) {
@@ -12562,6 +12807,11 @@ inline void FileOptions::set_allocated_php_metadata_namespace(std::string* php_m
}
php_metadata_namespace_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), php_metadata_namespace,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (php_metadata_namespace_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ php_metadata_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.php_metadata_namespace)
}
@@ -12611,6 +12861,11 @@ inline std::string* FileOptions::release_ruby_package() {
}
_has_bits_[0] &= ~0x00000200u;
return ruby_package_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (ruby_package_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ ruby_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void FileOptions::set_allocated_ruby_package(std::string* ruby_package) {
if (ruby_package != nullptr) {
@@ -12620,6 +12875,11 @@ inline void FileOptions::set_allocated_ruby_package(std::string* ruby_package) {
}
ruby_package_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ruby_package,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (ruby_package_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ ruby_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.ruby_package)
}
@@ -13472,6 +13732,11 @@ inline std::string* UninterpretedOption_NamePart::release_name_part() {
}
_has_bits_[0] &= ~0x00000001u;
return name_part_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_part_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_part_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void UninterpretedOption_NamePart::set_allocated_name_part(std::string* name_part) {
if (name_part != nullptr) {
@@ -13481,6 +13746,11 @@ inline void UninterpretedOption_NamePart::set_allocated_name_part(std::string* n
}
name_part_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name_part,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_part_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_part_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.NamePart.name_part)
}
@@ -13602,6 +13872,11 @@ inline std::string* UninterpretedOption::release_identifier_value() {
}
_has_bits_[0] &= ~0x00000001u;
return identifier_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (identifier_value_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ identifier_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void UninterpretedOption::set_allocated_identifier_value(std::string* identifier_value) {
if (identifier_value != nullptr) {
@@ -13611,6 +13886,11 @@ inline void UninterpretedOption::set_allocated_identifier_value(std::string* ide
}
identifier_value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), identifier_value,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (identifier_value_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ identifier_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.identifier_value)
}
@@ -13626,18 +13906,18 @@ inline void UninterpretedOption::clear_positive_int_value() {
positive_int_value_ = uint64_t{0u};
_has_bits_[0] &= ~0x00000008u;
}
-inline ::PROTOBUF_NAMESPACE_ID::uint64 UninterpretedOption::_internal_positive_int_value() const {
+inline uint64_t UninterpretedOption::_internal_positive_int_value() const {
return positive_int_value_;
}
-inline ::PROTOBUF_NAMESPACE_ID::uint64 UninterpretedOption::positive_int_value() const {
+inline uint64_t UninterpretedOption::positive_int_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.positive_int_value)
return _internal_positive_int_value();
}
-inline void UninterpretedOption::_internal_set_positive_int_value(::PROTOBUF_NAMESPACE_ID::uint64 value) {
+inline void UninterpretedOption::_internal_set_positive_int_value(uint64_t value) {
_has_bits_[0] |= 0x00000008u;
positive_int_value_ = value;
}
-inline void UninterpretedOption::set_positive_int_value(::PROTOBUF_NAMESPACE_ID::uint64 value) {
+inline void UninterpretedOption::set_positive_int_value(uint64_t value) {
_internal_set_positive_int_value(value);
// @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.positive_int_value)
}
@@ -13654,18 +13934,18 @@ inline void UninterpretedOption::clear_negative_int_value() {
negative_int_value_ = int64_t{0};
_has_bits_[0] &= ~0x00000010u;
}
-inline ::PROTOBUF_NAMESPACE_ID::int64 UninterpretedOption::_internal_negative_int_value() const {
+inline int64_t UninterpretedOption::_internal_negative_int_value() const {
return negative_int_value_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int64 UninterpretedOption::negative_int_value() const {
+inline int64_t UninterpretedOption::negative_int_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.negative_int_value)
return _internal_negative_int_value();
}
-inline void UninterpretedOption::_internal_set_negative_int_value(::PROTOBUF_NAMESPACE_ID::int64 value) {
+inline void UninterpretedOption::_internal_set_negative_int_value(int64_t value) {
_has_bits_[0] |= 0x00000010u;
negative_int_value_ = value;
}
-inline void UninterpretedOption::set_negative_int_value(::PROTOBUF_NAMESPACE_ID::int64 value) {
+inline void UninterpretedOption::set_negative_int_value(int64_t value) {
_internal_set_negative_int_value(value);
// @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.negative_int_value)
}
@@ -13744,6 +14024,11 @@ inline std::string* UninterpretedOption::release_string_value() {
}
_has_bits_[0] &= ~0x00000002u;
return string_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (string_value_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ string_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void UninterpretedOption::set_allocated_string_value(std::string* string_value) {
if (string_value != nullptr) {
@@ -13753,6 +14038,11 @@ inline void UninterpretedOption::set_allocated_string_value(std::string* string_
}
string_value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), string_value,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (string_value_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ string_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.string_value)
}
@@ -13802,6 +14092,11 @@ inline std::string* UninterpretedOption::release_aggregate_value() {
}
_has_bits_[0] &= ~0x00000004u;
return aggregate_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (aggregate_value_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ aggregate_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void UninterpretedOption::set_allocated_aggregate_value(std::string* aggregate_value) {
if (aggregate_value != nullptr) {
@@ -13811,6 +14106,11 @@ inline void UninterpretedOption::set_allocated_aggregate_value(std::string* aggr
}
aggregate_value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), aggregate_value,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (aggregate_value_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ aggregate_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.aggregate_value)
}
@@ -13828,38 +14128,38 @@ inline int SourceCodeInfo_Location::path_size() const {
inline void SourceCodeInfo_Location::clear_path() {
path_.Clear();
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 SourceCodeInfo_Location::_internal_path(int index) const {
+inline int32_t SourceCodeInfo_Location::_internal_path(int index) const {
return path_.Get(index);
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 SourceCodeInfo_Location::path(int index) const {
+inline int32_t SourceCodeInfo_Location::path(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.path)
return _internal_path(index);
}
-inline void SourceCodeInfo_Location::set_path(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void SourceCodeInfo_Location::set_path(int index, int32_t value) {
path_.Set(index, value);
// @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.path)
}
-inline void SourceCodeInfo_Location::_internal_add_path(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void SourceCodeInfo_Location::_internal_add_path(int32_t value) {
path_.Add(value);
}
-inline void SourceCodeInfo_Location::add_path(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void SourceCodeInfo_Location::add_path(int32_t value) {
_internal_add_path(value);
// @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.path)
}
-inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
+inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
SourceCodeInfo_Location::_internal_path() const {
return path_;
}
-inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
+inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
SourceCodeInfo_Location::path() const {
// @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.path)
return _internal_path();
}
-inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
+inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
SourceCodeInfo_Location::_internal_mutable_path() {
return &path_;
}
-inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
+inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
SourceCodeInfo_Location::mutable_path() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.path)
return _internal_mutable_path();
@@ -13875,38 +14175,38 @@ inline int SourceCodeInfo_Location::span_size() const {
inline void SourceCodeInfo_Location::clear_span() {
span_.Clear();
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 SourceCodeInfo_Location::_internal_span(int index) const {
+inline int32_t SourceCodeInfo_Location::_internal_span(int index) const {
return span_.Get(index);
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 SourceCodeInfo_Location::span(int index) const {
+inline int32_t SourceCodeInfo_Location::span(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.span)
return _internal_span(index);
}
-inline void SourceCodeInfo_Location::set_span(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void SourceCodeInfo_Location::set_span(int index, int32_t value) {
span_.Set(index, value);
// @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.span)
}
-inline void SourceCodeInfo_Location::_internal_add_span(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void SourceCodeInfo_Location::_internal_add_span(int32_t value) {
span_.Add(value);
}
-inline void SourceCodeInfo_Location::add_span(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void SourceCodeInfo_Location::add_span(int32_t value) {
_internal_add_span(value);
// @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.span)
}
-inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
+inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
SourceCodeInfo_Location::_internal_span() const {
return span_;
}
-inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
+inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
SourceCodeInfo_Location::span() const {
// @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.span)
return _internal_span();
}
-inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
+inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
SourceCodeInfo_Location::_internal_mutable_span() {
return &span_;
}
-inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
+inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
SourceCodeInfo_Location::mutable_span() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.span)
return _internal_mutable_span();
@@ -13958,6 +14258,11 @@ inline std::string* SourceCodeInfo_Location::release_leading_comments() {
}
_has_bits_[0] &= ~0x00000001u;
return leading_comments_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (leading_comments_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ leading_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void SourceCodeInfo_Location::set_allocated_leading_comments(std::string* leading_comments) {
if (leading_comments != nullptr) {
@@ -13967,6 +14272,11 @@ inline void SourceCodeInfo_Location::set_allocated_leading_comments(std::string*
}
leading_comments_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), leading_comments,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (leading_comments_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ leading_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.leading_comments)
}
@@ -14016,6 +14326,11 @@ inline std::string* SourceCodeInfo_Location::release_trailing_comments() {
}
_has_bits_[0] &= ~0x00000002u;
return trailing_comments_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (trailing_comments_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ trailing_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void SourceCodeInfo_Location::set_allocated_trailing_comments(std::string* trailing_comments) {
if (trailing_comments != nullptr) {
@@ -14025,6 +14340,11 @@ inline void SourceCodeInfo_Location::set_allocated_trailing_comments(std::string
}
trailing_comments_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), trailing_comments,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (trailing_comments_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ trailing_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.trailing_comments)
}
@@ -14161,38 +14481,38 @@ inline int GeneratedCodeInfo_Annotation::path_size() const {
inline void GeneratedCodeInfo_Annotation::clear_path() {
path_.Clear();
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 GeneratedCodeInfo_Annotation::_internal_path(int index) const {
+inline int32_t GeneratedCodeInfo_Annotation::_internal_path(int index) const {
return path_.Get(index);
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 GeneratedCodeInfo_Annotation::path(int index) const {
+inline int32_t GeneratedCodeInfo_Annotation::path(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.path)
return _internal_path(index);
}
-inline void GeneratedCodeInfo_Annotation::set_path(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void GeneratedCodeInfo_Annotation::set_path(int index, int32_t value) {
path_.Set(index, value);
// @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.path)
}
-inline void GeneratedCodeInfo_Annotation::_internal_add_path(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void GeneratedCodeInfo_Annotation::_internal_add_path(int32_t value) {
path_.Add(value);
}
-inline void GeneratedCodeInfo_Annotation::add_path(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void GeneratedCodeInfo_Annotation::add_path(int32_t value) {
_internal_add_path(value);
// @@protoc_insertion_point(field_add:google.protobuf.GeneratedCodeInfo.Annotation.path)
}
-inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
+inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
GeneratedCodeInfo_Annotation::_internal_path() const {
return path_;
}
-inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
+inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
GeneratedCodeInfo_Annotation::path() const {
// @@protoc_insertion_point(field_list:google.protobuf.GeneratedCodeInfo.Annotation.path)
return _internal_path();
}
-inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
+inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
GeneratedCodeInfo_Annotation::_internal_mutable_path() {
return &path_;
}
-inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
+inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
GeneratedCodeInfo_Annotation::mutable_path() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.GeneratedCodeInfo.Annotation.path)
return _internal_mutable_path();
@@ -14244,6 +14564,11 @@ inline std::string* GeneratedCodeInfo_Annotation::release_source_file() {
}
_has_bits_[0] &= ~0x00000001u;
return source_file_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (source_file_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ source_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
inline void GeneratedCodeInfo_Annotation::set_allocated_source_file(std::string* source_file) {
if (source_file != nullptr) {
@@ -14253,6 +14578,11 @@ inline void GeneratedCodeInfo_Annotation::set_allocated_source_file(std::string*
}
source_file_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), source_file,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (source_file_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ source_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
}
@@ -14268,18 +14598,18 @@ inline void GeneratedCodeInfo_Annotation::clear_begin() {
begin_ = 0;
_has_bits_[0] &= ~0x00000002u;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 GeneratedCodeInfo_Annotation::_internal_begin() const {
+inline int32_t GeneratedCodeInfo_Annotation::_internal_begin() const {
return begin_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 GeneratedCodeInfo_Annotation::begin() const {
+inline int32_t GeneratedCodeInfo_Annotation::begin() const {
// @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.begin)
return _internal_begin();
}
-inline void GeneratedCodeInfo_Annotation::_internal_set_begin(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void GeneratedCodeInfo_Annotation::_internal_set_begin(int32_t value) {
_has_bits_[0] |= 0x00000002u;
begin_ = value;
}
-inline void GeneratedCodeInfo_Annotation::set_begin(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void GeneratedCodeInfo_Annotation::set_begin(int32_t value) {
_internal_set_begin(value);
// @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.begin)
}
@@ -14296,18 +14626,18 @@ inline void GeneratedCodeInfo_Annotation::clear_end() {
end_ = 0;
_has_bits_[0] &= ~0x00000004u;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 GeneratedCodeInfo_Annotation::_internal_end() const {
+inline int32_t GeneratedCodeInfo_Annotation::_internal_end() const {
return end_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 GeneratedCodeInfo_Annotation::end() const {
+inline int32_t GeneratedCodeInfo_Annotation::end() const {
// @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.end)
return _internal_end();
}
-inline void GeneratedCodeInfo_Annotation::_internal_set_end(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void GeneratedCodeInfo_Annotation::_internal_set_end(int32_t value) {
_has_bits_[0] |= 0x00000004u;
end_ = value;
}
-inline void GeneratedCodeInfo_Annotation::set_end(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void GeneratedCodeInfo_Annotation::set_end(int32_t value) {
_internal_set_end(value);
// @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.end)
}
diff --git a/src/google/protobuf/duration.pb.cc b/src/google/protobuf/duration.pb.cc
index 6a3e9efe9..5a1bf18d2 100644
--- a/src/google/protobuf/duration.pb.cc
+++ b/src/google/protobuf/duration.pb.cc
@@ -35,7 +35,7 @@ static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fduration_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fduration_2eproto = nullptr;
-const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fduration_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
+const uint32_t TableStruct_google_2fprotobuf_2fduration_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Duration, _internal_metadata_),
~0u, // no _extensions_
@@ -130,7 +130,7 @@ void Duration::SetCachedSize(int size) const {
void Duration::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Duration)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -143,12 +143,12 @@ void Duration::Clear() {
const char* Duration::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// int64 seconds = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
@@ -156,7 +156,7 @@ const char* Duration::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::i
continue;
// int32 nanos = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
@@ -185,10 +185,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* Duration::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* Duration::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Duration)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// int64 seconds = 1;
@@ -215,7 +215,7 @@ size_t Duration::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Duration)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -248,7 +248,7 @@ void Duration::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void Duration::MergeFrom(const Duration& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Duration)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_seconds() != 0) {
diff --git a/src/google/protobuf/duration.pb.h b/src/google/protobuf/duration.pb.h
index bc5a31aa2..4c9ed6519 100644
--- a/src/google/protobuf/duration.pb.h
+++ b/src/google/protobuf/duration.pb.h
@@ -50,7 +50,7 @@ struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fduration_2eproto {
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
- static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
+ static const uint32_t offsets[];
};
PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fduration_2eproto;
PROTOBUF_NAMESPACE_OPEN
@@ -158,8 +158,8 @@ class PROTOBUF_EXPORT Duration final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -194,20 +194,20 @@ class PROTOBUF_EXPORT Duration final :
};
// int64 seconds = 1;
void clear_seconds();
- ::PROTOBUF_NAMESPACE_ID::int64 seconds() const;
- void set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value);
+ int64_t seconds() const;
+ void set_seconds(int64_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int64 _internal_seconds() const;
- void _internal_set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value);
+ int64_t _internal_seconds() const;
+ void _internal_set_seconds(int64_t value);
public:
// int32 nanos = 2;
void clear_nanos();
- ::PROTOBUF_NAMESPACE_ID::int32 nanos() const;
- void set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t nanos() const;
+ void set_nanos(int32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_nanos() const;
- void _internal_set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t _internal_nanos() const;
+ void _internal_set_nanos(int32_t value);
public:
// @@protoc_insertion_point(class_scope:google.protobuf.Duration)
@@ -217,8 +217,8 @@ class PROTOBUF_EXPORT Duration final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::int64 seconds_;
- ::PROTOBUF_NAMESPACE_ID::int32 nanos_;
+ int64_t seconds_;
+ int32_t nanos_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_google_2fprotobuf_2fduration_2eproto;
};
@@ -237,18 +237,18 @@ class PROTOBUF_EXPORT Duration final :
inline void Duration::clear_seconds() {
seconds_ = int64_t{0};
}
-inline ::PROTOBUF_NAMESPACE_ID::int64 Duration::_internal_seconds() const {
+inline int64_t Duration::_internal_seconds() const {
return seconds_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int64 Duration::seconds() const {
+inline int64_t Duration::seconds() const {
// @@protoc_insertion_point(field_get:google.protobuf.Duration.seconds)
return _internal_seconds();
}
-inline void Duration::_internal_set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value) {
+inline void Duration::_internal_set_seconds(int64_t value) {
seconds_ = value;
}
-inline void Duration::set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value) {
+inline void Duration::set_seconds(int64_t value) {
_internal_set_seconds(value);
// @@protoc_insertion_point(field_set:google.protobuf.Duration.seconds)
}
@@ -257,18 +257,18 @@ inline void Duration::set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value) {
inline void Duration::clear_nanos() {
nanos_ = 0;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Duration::_internal_nanos() const {
+inline int32_t Duration::_internal_nanos() const {
return nanos_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Duration::nanos() const {
+inline int32_t Duration::nanos() const {
// @@protoc_insertion_point(field_get:google.protobuf.Duration.nanos)
return _internal_nanos();
}
-inline void Duration::_internal_set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Duration::_internal_set_nanos(int32_t value) {
nanos_ = value;
}
-inline void Duration::set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Duration::set_nanos(int32_t value) {
_internal_set_nanos(value);
// @@protoc_insertion_point(field_set:google.protobuf.Duration.nanos)
}
diff --git a/src/google/protobuf/empty.pb.cc b/src/google/protobuf/empty.pb.cc
index f773af10f..415cd413c 100644
--- a/src/google/protobuf/empty.pb.cc
+++ b/src/google/protobuf/empty.pb.cc
@@ -33,7 +33,7 @@ static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fempty_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fempty_2eproto = nullptr;
-const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fempty_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
+const uint32_t TableStruct_google_2fprotobuf_2fempty_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Empty, _internal_metadata_),
~0u, // no _extensions_
diff --git a/src/google/protobuf/empty.pb.h b/src/google/protobuf/empty.pb.h
index a813ddc16..3aaa2eb50 100644
--- a/src/google/protobuf/empty.pb.h
+++ b/src/google/protobuf/empty.pb.h
@@ -51,7 +51,7 @@ struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fempty_2eproto {
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
- static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
+ static const uint32_t offsets[];
};
PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fempty_2eproto;
PROTOBUF_NAMESPACE_OPEN
diff --git a/src/google/protobuf/extension_set.h b/src/google/protobuf/extension_set.h
index 6f1d2b65a..e21de264c 100644
--- a/src/google/protobuf/extension_set.h
+++ b/src/google/protobuf/extension_set.h
@@ -101,22 +101,22 @@ typedef bool EnumValidityFuncWithArg(const void* arg, int number);
// Information about a registered extension.
struct ExtensionInfo {
- inline ExtensionInfo() {}
- inline ExtensionInfo(const MessageLite* extendee, int param_number,
- FieldType type_param, bool isrepeated, bool ispacked)
+ constexpr ExtensionInfo() : enum_validity_check() {}
+ constexpr ExtensionInfo(const MessageLite* extendee, int param_number,
+ FieldType type_param, bool isrepeated, bool ispacked)
: message(extendee),
number(param_number),
type(type_param),
is_repeated(isrepeated),
is_packed(ispacked),
- descriptor(nullptr) {}
+ enum_validity_check() {}
- const MessageLite* message;
- int number;
+ const MessageLite* message = nullptr;
+ int number = 0;
- FieldType type;
- bool is_repeated;
- bool is_packed;
+ FieldType type = 0;
+ bool is_repeated = false;
+ bool is_packed = false;
struct EnumValidityCheck {
EnumValidityFuncWithArg* func;
@@ -135,7 +135,7 @@ struct ExtensionInfo {
// The descriptor for this extension, if one exists and is known. May be
// nullptr. Must not be nullptr if the descriptor for the extension does not
// live in the same pool as the descriptor for the containing type.
- const FieldDescriptor* descriptor;
+ const FieldDescriptor* descriptor = nullptr;
};
// Abstract interface for an object which looks up extension definitions. Used
diff --git a/src/google/protobuf/field_mask.pb.cc b/src/google/protobuf/field_mask.pb.cc
index 1bc0f8b9c..60edb1eb3 100644
--- a/src/google/protobuf/field_mask.pb.cc
+++ b/src/google/protobuf/field_mask.pb.cc
@@ -34,7 +34,7 @@ static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr;
-const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
+const uint32_t TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldMask, _internal_metadata_),
~0u, // no _extensions_
@@ -123,7 +123,7 @@ void FieldMask::SetCachedSize(int size) const {
void FieldMask::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FieldMask)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -134,12 +134,12 @@ void FieldMask::Clear() {
const char* FieldMask::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated string paths = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr -= 1;
do {
ptr += 1;
@@ -175,10 +175,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* FieldMask::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* FieldMask::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldMask)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated string paths = 1;
@@ -203,7 +203,7 @@ size_t FieldMask::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldMask)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -234,7 +234,7 @@ void FieldMask::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void FieldMask::MergeFrom(const FieldMask& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldMask)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
paths_.MergeFrom(from.paths_);
diff --git a/src/google/protobuf/field_mask.pb.h b/src/google/protobuf/field_mask.pb.h
index 6189ddd0d..619f9a380 100644
--- a/src/google/protobuf/field_mask.pb.h
+++ b/src/google/protobuf/field_mask.pb.h
@@ -50,7 +50,7 @@ struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto {
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
- static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
+ static const uint32_t offsets[];
};
PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto;
PROTOBUF_NAMESPACE_OPEN
@@ -158,8 +158,8 @@ class PROTOBUF_EXPORT FieldMask final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc
index 302fba522..05050b7f9 100644
--- a/src/google/protobuf/port_def.inc
+++ b/src/google/protobuf/port_def.inc
@@ -468,6 +468,12 @@
#error PROTOBUF_FORCE_COPY_IN_MOVE was previously defined
#endif
+// Force copy the default string to a string field so that non-optimized builds
+// have harder-to-rely-on address stability.
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+#error PROTOBUF_FORCE_COPY_DEFAULT_STRING was previously defined
+#endif
+
#ifdef PROTOBUF_FALLTHROUGH_INTENDED
#error PROTOBUF_FALLTHROUGH_INTENDED was previously defined
#endif
diff --git a/src/google/protobuf/port_undef.inc b/src/google/protobuf/port_undef.inc
index 5fef6e455..ad57f862e 100644
--- a/src/google/protobuf/port_undef.inc
+++ b/src/google/protobuf/port_undef.inc
@@ -67,6 +67,7 @@
#undef PROTOBUF_FORCE_COPY_IN_RELEASE
#undef PROTOBUF_FORCE_COPY_IN_SWAP
#undef PROTOBUF_FORCE_COPY_IN_MOVE
+#undef PROTOBUF_FORCE_COPY_DEFAULT_STRING
#undef PROTOBUF_NAMESPACE_OPEN
#undef PROTOBUF_NAMESPACE_CLOSE
#undef PROTOBUF_UNUSED
diff --git a/src/google/protobuf/repeated_field.h b/src/google/protobuf/repeated_field.h
index dd0fa519b..44dd10c59 100644
--- a/src/google/protobuf/repeated_field.h
+++ b/src/google/protobuf/repeated_field.h
@@ -1140,6 +1140,7 @@ class RepeatedPtrField final : private internal::RepeatedPtrFieldBase {
// Get the number of cleared objects that are currently being kept
// around for reuse.
int ClearedCount() const;
+#ifndef PROTOBUF_FUTURE_BREAKING_CHANGES
// Add an element to the pool of cleared objects, passing ownership to
// the RepeatedPtrField. The element must be cleared prior to calling
// this method.
@@ -1155,6 +1156,7 @@ class RepeatedPtrField final : private internal::RepeatedPtrFieldBase {
// This method cannot be called when the repeated field is on an arena; doing
// so will trigger a GOOGLE_DCHECK-failure.
PROTOBUF_MUST_USE_RESULT Element* ReleaseCleared();
+#endif // !PROTOBUF_FUTURE_BREAKING_CHANGES
// Removes the element referenced by position.
//
@@ -2480,6 +2482,7 @@ inline int RepeatedPtrField<Element>::ClearedCount() const {
return RepeatedPtrFieldBase::ClearedCount();
}
+#ifndef PROTOBUF_FUTURE_BREAKING_CHANGES
template <typename Element>
inline void RepeatedPtrField<Element>::AddCleared(Element* value) {
return RepeatedPtrFieldBase::AddCleared<TypeHandler>(value);
@@ -2489,6 +2492,7 @@ template <typename Element>
inline Element* RepeatedPtrField<Element>::ReleaseCleared() {
return RepeatedPtrFieldBase::ReleaseCleared<TypeHandler>();
}
+#endif // !PROTOBUF_FUTURE_BREAKING_CHANGES
template <typename Element>
inline void RepeatedPtrField<Element>::Reserve(int new_size) {
diff --git a/src/google/protobuf/repeated_field_unittest.cc b/src/google/protobuf/repeated_field_unittest.cc
index ad1e82bfd..297baee2c 100644
--- a/src/google/protobuf/repeated_field_unittest.cc
+++ b/src/google/protobuf/repeated_field_unittest.cc
@@ -1140,6 +1140,7 @@ TEST(RepeatedPtrField, ClearedElements) {
field.Clear();
EXPECT_EQ(field.ClearedCount(), 2);
+#ifndef PROTOBUF_FUTURE_BREAKING_CHANGES
EXPECT_EQ(field.ReleaseCleared(), original); // Take ownership again.
EXPECT_EQ(field.ClearedCount(), 1);
EXPECT_NE(field.Add(), original);
@@ -1151,6 +1152,7 @@ TEST(RepeatedPtrField, ClearedElements) {
EXPECT_EQ(field.ClearedCount(), 1);
EXPECT_EQ(field.Add(), original);
EXPECT_EQ(field.ClearedCount(), 0);
+#endif // !PROTOBUF_FUTURE_BREAKING_CHANGES
}
// Test all code paths in AddAllocated().
diff --git a/src/google/protobuf/source_context.pb.cc b/src/google/protobuf/source_context.pb.cc
index 7ccd359d1..4edb90bbb 100644
--- a/src/google/protobuf/source_context.pb.cc
+++ b/src/google/protobuf/source_context.pb.cc
@@ -34,7 +34,7 @@ static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto = nullptr;
-const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
+const uint32_t TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceContext, _internal_metadata_),
~0u, // no _extensions_
@@ -93,6 +93,9 @@ SourceContext::SourceContext(const SourceContext& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
file_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ file_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_file_name().empty()) {
file_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_file_name(),
GetArenaForAllocation());
@@ -102,6 +105,9 @@ SourceContext::SourceContext(const SourceContext& from)
inline void SourceContext::SharedCtor() {
file_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ file_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
SourceContext::~SourceContext() {
@@ -128,7 +134,7 @@ void SourceContext::SetCachedSize(int size) const {
void SourceContext::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.SourceContext)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -139,12 +145,12 @@ void SourceContext::Clear() {
const char* SourceContext::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// string file_name = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_file_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.SourceContext.file_name"));
@@ -175,10 +181,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* SourceContext::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* SourceContext::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceContext)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// string file_name = 1;
@@ -203,7 +209,7 @@ size_t SourceContext::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceContext)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -233,7 +239,7 @@ void SourceContext::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void SourceContext::MergeFrom(const SourceContext& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceContext)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_file_name().empty()) {
diff --git a/src/google/protobuf/source_context.pb.h b/src/google/protobuf/source_context.pb.h
index 4a4ac3df5..64377a678 100644
--- a/src/google/protobuf/source_context.pb.h
+++ b/src/google/protobuf/source_context.pb.h
@@ -50,7 +50,7 @@ struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
- static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
+ static const uint32_t offsets[];
};
PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto;
PROTOBUF_NAMESPACE_OPEN
@@ -158,8 +158,8 @@ class PROTOBUF_EXPORT SourceContext final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -270,6 +270,11 @@ inline void SourceContext::set_allocated_file_name(std::string* file_name) {
}
file_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), file_name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (file_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ file_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceContext.file_name)
}
diff --git a/src/google/protobuf/struct.pb.cc b/src/google/protobuf/struct.pb.cc
index 81c38eb71..f90e213f7 100644
--- a/src/google/protobuf/struct.pb.cc
+++ b/src/google/protobuf/struct.pb.cc
@@ -69,7 +69,7 @@ static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fstruct_2eproto = nullptr;
-const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fstruct_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
+const uint32_t TableStruct_google_2fprotobuf_2fstruct_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, _has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, _internal_metadata_),
~0u, // no _extensions_
@@ -235,7 +235,7 @@ void Struct::SetCachedSize(int size) const {
void Struct::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Struct)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -246,12 +246,12 @@ void Struct::Clear() {
const char* Struct::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// map<string, .google.protobuf.Value> fields = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr -= 1;
do {
ptr += 1;
@@ -285,10 +285,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* Struct::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* Struct::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Struct)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// map<string, .google.protobuf.Value> fields = 1;
@@ -345,7 +345,7 @@ size_t Struct::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Struct)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -377,7 +377,7 @@ void Struct::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void Struct::MergeFrom(const Struct& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Struct)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
fields_.MergeFrom(from.fields_);
@@ -567,7 +567,7 @@ void Value::clear_kind() {
void Value::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Value)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -578,13 +578,13 @@ void Value::Clear() {
const char* Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// .google.protobuf.NullValue null_value = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
- ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
+ uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
_internal_set_null_value(static_cast<::PROTOBUF_NAMESPACE_ID::NullValue>(val));
} else
@@ -592,7 +592,7 @@ const char* Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
continue;
// double number_value = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 17)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 17)) {
_internal_set_number_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
ptr += sizeof(double);
} else
@@ -600,7 +600,7 @@ const char* Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
continue;
// string string_value = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
auto str = _internal_mutable_string_value();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Value.string_value"));
@@ -610,7 +610,7 @@ const char* Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
continue;
// bool bool_value = 4;
case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_internal_set_bool_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
CHK_(ptr);
} else
@@ -618,7 +618,7 @@ const char* Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
continue;
// .google.protobuf.Struct struct_value = 5;
case 5:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
ptr = ctx->ParseMessage(_internal_mutable_struct_value(), ptr);
CHK_(ptr);
} else
@@ -626,7 +626,7 @@ const char* Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
continue;
// .google.protobuf.ListValue list_value = 6;
case 6:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
ptr = ctx->ParseMessage(_internal_mutable_list_value(), ptr);
CHK_(ptr);
} else
@@ -655,10 +655,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* Value::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* Value::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Value)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// .google.protobuf.NullValue null_value = 1;
@@ -718,7 +718,7 @@ size_t Value::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Value)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -783,7 +783,7 @@ void Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void Value::MergeFrom(const Value& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Value)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
switch (from.kind_case()) {
@@ -891,7 +891,7 @@ void ListValue::SetCachedSize(int size) const {
void ListValue::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.ListValue)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -902,12 +902,12 @@ void ListValue::Clear() {
const char* ListValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated .google.protobuf.Value values = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr -= 1;
do {
ptr += 1;
@@ -941,10 +941,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* ListValue::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* ListValue::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ListValue)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated .google.protobuf.Value values = 1;
@@ -967,7 +967,7 @@ size_t ListValue::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.ListValue)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -997,7 +997,7 @@ void ListValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void ListValue::MergeFrom(const ListValue& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ListValue)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
values_.MergeFrom(from.values_);
diff --git a/src/google/protobuf/struct.pb.h b/src/google/protobuf/struct.pb.h
index 151a89564..716e66c38 100644
--- a/src/google/protobuf/struct.pb.h
+++ b/src/google/protobuf/struct.pb.h
@@ -54,7 +54,7 @@ struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fstruct_2eproto {
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
- static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
+ static const uint32_t offsets[];
};
PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fstruct_2eproto;
PROTOBUF_NAMESPACE_OPEN
@@ -81,8 +81,8 @@ PROTOBUF_NAMESPACE_OPEN
enum NullValue : int {
NULL_VALUE = 0,
- NullValue_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(),
- NullValue_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max()
+ NullValue_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
+ NullValue_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
};
PROTOBUF_EXPORT bool NullValue_IsValid(int value);
constexpr NullValue NullValue_MIN = NULL_VALUE;
@@ -223,8 +223,8 @@ class PROTOBUF_EXPORT Struct final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -394,8 +394,8 @@ class PROTOBUF_EXPORT Value final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -554,7 +554,7 @@ class PROTOBUF_EXPORT Value final :
::PROTOBUF_NAMESPACE_ID::ListValue* list_value_;
} kind_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1];
+ uint32_t _oneof_case_[1];
friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto;
};
@@ -653,8 +653,8 @@ class PROTOBUF_EXPORT ListValue final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
diff --git a/src/google/protobuf/struct.proto b/src/google/protobuf/struct.proto
index 545215c25..0ac843ca0 100644
--- a/src/google/protobuf/struct.proto
+++ b/src/google/protobuf/struct.proto
@@ -55,8 +55,8 @@ message Struct {
// `Value` represents a dynamically typed value which can be either
// null, a number, a string, a boolean, a recursive struct value, or a
-// list of values. A producer of value is expected to set one of that
-// variants, absence of any variant indicates an error.
+// list of values. A producer of value is expected to set one of these
+// variants. Absence of any variant indicates an error.
//
// The JSON representation for `Value` is JSON value.
message Value {
diff --git a/src/google/protobuf/timestamp.pb.cc b/src/google/protobuf/timestamp.pb.cc
index 6918b49f1..71361e336 100644
--- a/src/google/protobuf/timestamp.pb.cc
+++ b/src/google/protobuf/timestamp.pb.cc
@@ -35,7 +35,7 @@ static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2ftimestamp_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2ftimestamp_2eproto = nullptr;
-const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2ftimestamp_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
+const uint32_t TableStruct_google_2fprotobuf_2ftimestamp_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Timestamp, _internal_metadata_),
~0u, // no _extensions_
@@ -130,7 +130,7 @@ void Timestamp::SetCachedSize(int size) const {
void Timestamp::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Timestamp)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -143,12 +143,12 @@ void Timestamp::Clear() {
const char* Timestamp::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// int64 seconds = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
@@ -156,7 +156,7 @@ const char* Timestamp::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::
continue;
// int32 nanos = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
@@ -185,10 +185,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* Timestamp::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* Timestamp::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Timestamp)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// int64 seconds = 1;
@@ -215,7 +215,7 @@ size_t Timestamp::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Timestamp)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -248,7 +248,7 @@ void Timestamp::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void Timestamp::MergeFrom(const Timestamp& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Timestamp)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_seconds() != 0) {
diff --git a/src/google/protobuf/timestamp.pb.h b/src/google/protobuf/timestamp.pb.h
index f0a05ef23..aebf4ca25 100644
--- a/src/google/protobuf/timestamp.pb.h
+++ b/src/google/protobuf/timestamp.pb.h
@@ -50,7 +50,7 @@ struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2ftimestamp_2eproto {
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
- static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
+ static const uint32_t offsets[];
};
PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ftimestamp_2eproto;
PROTOBUF_NAMESPACE_OPEN
@@ -158,8 +158,8 @@ class PROTOBUF_EXPORT Timestamp final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -194,20 +194,20 @@ class PROTOBUF_EXPORT Timestamp final :
};
// int64 seconds = 1;
void clear_seconds();
- ::PROTOBUF_NAMESPACE_ID::int64 seconds() const;
- void set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value);
+ int64_t seconds() const;
+ void set_seconds(int64_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int64 _internal_seconds() const;
- void _internal_set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value);
+ int64_t _internal_seconds() const;
+ void _internal_set_seconds(int64_t value);
public:
// int32 nanos = 2;
void clear_nanos();
- ::PROTOBUF_NAMESPACE_ID::int32 nanos() const;
- void set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t nanos() const;
+ void set_nanos(int32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_nanos() const;
- void _internal_set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t _internal_nanos() const;
+ void _internal_set_nanos(int32_t value);
public:
// @@protoc_insertion_point(class_scope:google.protobuf.Timestamp)
@@ -217,8 +217,8 @@ class PROTOBUF_EXPORT Timestamp final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::int64 seconds_;
- ::PROTOBUF_NAMESPACE_ID::int32 nanos_;
+ int64_t seconds_;
+ int32_t nanos_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_google_2fprotobuf_2ftimestamp_2eproto;
};
@@ -237,18 +237,18 @@ class PROTOBUF_EXPORT Timestamp final :
inline void Timestamp::clear_seconds() {
seconds_ = int64_t{0};
}
-inline ::PROTOBUF_NAMESPACE_ID::int64 Timestamp::_internal_seconds() const {
+inline int64_t Timestamp::_internal_seconds() const {
return seconds_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int64 Timestamp::seconds() const {
+inline int64_t Timestamp::seconds() const {
// @@protoc_insertion_point(field_get:google.protobuf.Timestamp.seconds)
return _internal_seconds();
}
-inline void Timestamp::_internal_set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value) {
+inline void Timestamp::_internal_set_seconds(int64_t value) {
seconds_ = value;
}
-inline void Timestamp::set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value) {
+inline void Timestamp::set_seconds(int64_t value) {
_internal_set_seconds(value);
// @@protoc_insertion_point(field_set:google.protobuf.Timestamp.seconds)
}
@@ -257,18 +257,18 @@ inline void Timestamp::set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value) {
inline void Timestamp::clear_nanos() {
nanos_ = 0;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Timestamp::_internal_nanos() const {
+inline int32_t Timestamp::_internal_nanos() const {
return nanos_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Timestamp::nanos() const {
+inline int32_t Timestamp::nanos() const {
// @@protoc_insertion_point(field_get:google.protobuf.Timestamp.nanos)
return _internal_nanos();
}
-inline void Timestamp::_internal_set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Timestamp::_internal_set_nanos(int32_t value) {
nanos_ = value;
}
-inline void Timestamp::set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Timestamp::set_nanos(int32_t value) {
_internal_set_nanos(value);
// @@protoc_insertion_point(field_set:google.protobuf.Timestamp.nanos)
}
diff --git a/src/google/protobuf/type.pb.cc b/src/google/protobuf/type.pb.cc
index 60e27b7ad..ffa3b2026 100644
--- a/src/google/protobuf/type.pb.cc
+++ b/src/google/protobuf/type.pb.cc
@@ -107,7 +107,7 @@ static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[3];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2ftype_2eproto = nullptr;
-const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2ftype_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
+const uint32_t TableStruct_google_2fprotobuf_2ftype_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, _internal_metadata_),
~0u, // no _extensions_
@@ -372,6 +372,9 @@ Type::Type(const Type& from)
options_(from.options_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
@@ -387,6 +390,9 @@ Type::Type(const Type& from)
inline void Type::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&source_context_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&syntax_) -
@@ -418,7 +424,7 @@ void Type::SetCachedSize(int size) const {
void Type::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Type)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -437,12 +443,12 @@ void Type::Clear() {
const char* Type::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// string name = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Type.name"));
@@ -452,7 +458,7 @@ const char* Type::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter
continue;
// repeated .google.protobuf.Field fields = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
@@ -465,7 +471,7 @@ const char* Type::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter
continue;
// repeated string oneofs = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
@@ -480,7 +486,7 @@ const char* Type::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter
continue;
// repeated .google.protobuf.Option options = 4;
case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr -= 1;
do {
ptr += 1;
@@ -493,7 +499,7 @@ const char* Type::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter
continue;
// .google.protobuf.SourceContext source_context = 5;
case 5:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
ptr = ctx->ParseMessage(_internal_mutable_source_context(), ptr);
CHK_(ptr);
} else
@@ -501,8 +507,8 @@ const char* Type::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter
continue;
// .google.protobuf.Syntax syntax = 6;
case 6:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
- ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
+ uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
_internal_set_syntax(static_cast<::PROTOBUF_NAMESPACE_ID::Syntax>(val));
} else
@@ -531,10 +537,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* Type::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* Type::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Type)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// string name = 1;
@@ -600,7 +606,7 @@ size_t Type::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Type)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -665,7 +671,7 @@ void Type::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void Type::MergeFrom(const Type& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Type)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
fields_.MergeFrom(from.fields_);
@@ -742,21 +748,33 @@ Field::Field(const Field& from)
options_(from.options_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
}
type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_type_url().empty()) {
type_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_type_url(),
GetArenaForAllocation());
}
json_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_json_name().empty()) {
json_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_json_name(),
GetArenaForAllocation());
}
default_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_default_value().empty()) {
default_value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_default_value(),
GetArenaForAllocation());
@@ -769,9 +787,21 @@ Field::Field(const Field& from)
inline void Field::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
json_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
default_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&kind_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&packed_) -
@@ -805,7 +835,7 @@ void Field::SetCachedSize(int size) const {
void Field::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Field)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -823,13 +853,13 @@ void Field::Clear() {
const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// .google.protobuf.Field.Kind kind = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
- ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
+ uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
_internal_set_kind(static_cast<::PROTOBUF_NAMESPACE_ID::Field_Kind>(val));
} else
@@ -837,8 +867,8 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
continue;
// .google.protobuf.Field.Cardinality cardinality = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
- ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
+ uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
_internal_set_cardinality(static_cast<::PROTOBUF_NAMESPACE_ID::Field_Cardinality>(val));
} else
@@ -846,7 +876,7 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
continue;
// int32 number = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
@@ -854,7 +884,7 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
continue;
// string name = 4;
case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Field.name"));
@@ -864,7 +894,7 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
continue;
// string type_url = 6;
case 6:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
auto str = _internal_mutable_type_url();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Field.type_url"));
@@ -874,7 +904,7 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
continue;
// int32 oneof_index = 7;
case 7:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
oneof_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
@@ -882,7 +912,7 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
continue;
// bool packed = 8;
case 8:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
packed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
@@ -890,7 +920,7 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
continue;
// repeated .google.protobuf.Option options = 9;
case 9:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
ptr -= 1;
do {
ptr += 1;
@@ -903,7 +933,7 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
continue;
// string json_name = 10;
case 10:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
auto str = _internal_mutable_json_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Field.json_name"));
@@ -913,7 +943,7 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte
continue;
// string default_value = 11;
case 11:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
auto str = _internal_mutable_default_value();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Field.default_value"));
@@ -944,10 +974,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* Field::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* Field::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Field)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// .google.protobuf.Field.Kind kind = 1;
@@ -1042,7 +1072,7 @@ size_t Field::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Field)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1127,7 +1157,7 @@ void Field::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void Field::MergeFrom(const Field& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Field)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
options_.MergeFrom(from.options_);
@@ -1246,6 +1276,9 @@ Enum::Enum(const Enum& from)
options_(from.options_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
@@ -1261,6 +1294,9 @@ Enum::Enum(const Enum& from)
inline void Enum::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&source_context_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&syntax_) -
@@ -1292,7 +1328,7 @@ void Enum::SetCachedSize(int size) const {
void Enum::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Enum)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1310,12 +1346,12 @@ void Enum::Clear() {
const char* Enum::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// string name = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Enum.name"));
@@ -1325,7 +1361,7 @@ const char* Enum::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter
continue;
// repeated .google.protobuf.EnumValue enumvalue = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
@@ -1338,7 +1374,7 @@ const char* Enum::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter
continue;
// repeated .google.protobuf.Option options = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
@@ -1351,7 +1387,7 @@ const char* Enum::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter
continue;
// .google.protobuf.SourceContext source_context = 4;
case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr = ctx->ParseMessage(_internal_mutable_source_context(), ptr);
CHK_(ptr);
} else
@@ -1359,8 +1395,8 @@ const char* Enum::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter
continue;
// .google.protobuf.Syntax syntax = 5;
case 5:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
- ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
+ uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
_internal_set_syntax(static_cast<::PROTOBUF_NAMESPACE_ID::Syntax>(val));
} else
@@ -1389,10 +1425,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* Enum::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* Enum::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Enum)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// string name = 1;
@@ -1448,7 +1484,7 @@ size_t Enum::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Enum)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1505,7 +1541,7 @@ void Enum::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void Enum::MergeFrom(const Enum& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Enum)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
enumvalue_.MergeFrom(from.enumvalue_);
@@ -1580,6 +1616,9 @@ EnumValue::EnumValue(const EnumValue& from)
options_(from.options_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
@@ -1590,6 +1629,9 @@ EnumValue::EnumValue(const EnumValue& from)
inline void EnumValue::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
number_ = 0;
}
@@ -1617,7 +1659,7 @@ void EnumValue::SetCachedSize(int size) const {
void EnumValue::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.EnumValue)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1630,12 +1672,12 @@ void EnumValue::Clear() {
const char* EnumValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// string name = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.EnumValue.name"));
@@ -1645,7 +1687,7 @@ const char* EnumValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::
continue;
// int32 number = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
@@ -1653,7 +1695,7 @@ const char* EnumValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::
continue;
// repeated .google.protobuf.Option options = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
@@ -1687,10 +1729,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* EnumValue::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* EnumValue::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValue)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// string name = 1;
@@ -1729,7 +1771,7 @@ size_t EnumValue::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValue)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1771,7 +1813,7 @@ void EnumValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void EnumValue::MergeFrom(const EnumValue& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValue)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
options_.MergeFrom(from.options_);
@@ -1845,6 +1887,9 @@ Option::Option(const Option& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
@@ -1859,6 +1904,9 @@ Option::Option(const Option& from)
inline void Option::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
value_ = nullptr;
}
@@ -1887,7 +1935,7 @@ void Option::SetCachedSize(int size) const {
void Option::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Option)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1902,12 +1950,12 @@ void Option::Clear() {
const char* Option::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// string name = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Option.name"));
@@ -1917,7 +1965,7 @@ const char* Option::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int
continue;
// .google.protobuf.Any value = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr = ctx->ParseMessage(_internal_mutable_value(), ptr);
CHK_(ptr);
} else
@@ -1946,10 +1994,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* Option::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* Option::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Option)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// string name = 1;
@@ -1982,7 +2030,7 @@ size_t Option::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Option)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -2019,7 +2067,7 @@ void Option::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void Option::MergeFrom(const Option& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Option)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_name().empty()) {
diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h
index 9bfaffa14..33bb4a68a 100644
--- a/src/google/protobuf/type.pb.h
+++ b/src/google/protobuf/type.pb.h
@@ -53,7 +53,7 @@ struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2ftype_2eproto {
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
- static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
+ static const uint32_t offsets[];
};
PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ftype_2eproto;
PROTOBUF_NAMESPACE_OPEN
@@ -102,8 +102,8 @@ enum Field_Kind : int {
Field_Kind_TYPE_SFIXED64 = 16,
Field_Kind_TYPE_SINT32 = 17,
Field_Kind_TYPE_SINT64 = 18,
- Field_Kind_Field_Kind_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(),
- Field_Kind_Field_Kind_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max()
+ Field_Kind_Field_Kind_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
+ Field_Kind_Field_Kind_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
};
PROTOBUF_EXPORT bool Field_Kind_IsValid(int value);
constexpr Field_Kind Field_Kind_Kind_MIN = Field_Kind_TYPE_UNKNOWN;
@@ -129,8 +129,8 @@ enum Field_Cardinality : int {
Field_Cardinality_CARDINALITY_OPTIONAL = 1,
Field_Cardinality_CARDINALITY_REQUIRED = 2,
Field_Cardinality_CARDINALITY_REPEATED = 3,
- Field_Cardinality_Field_Cardinality_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(),
- Field_Cardinality_Field_Cardinality_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max()
+ Field_Cardinality_Field_Cardinality_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
+ Field_Cardinality_Field_Cardinality_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
};
PROTOBUF_EXPORT bool Field_Cardinality_IsValid(int value);
constexpr Field_Cardinality Field_Cardinality_Cardinality_MIN = Field_Cardinality_CARDINALITY_UNKNOWN;
@@ -154,8 +154,8 @@ inline bool Field_Cardinality_Parse(
enum Syntax : int {
SYNTAX_PROTO2 = 0,
SYNTAX_PROTO3 = 1,
- Syntax_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(),
- Syntax_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max()
+ Syntax_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
+ Syntax_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
};
PROTOBUF_EXPORT bool Syntax_IsValid(int value);
constexpr Syntax Syntax_MIN = SYNTAX_PROTO2;
@@ -271,8 +271,8 @@ class PROTOBUF_EXPORT Type final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -521,8 +521,8 @@ class PROTOBUF_EXPORT Field final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -755,20 +755,20 @@ class PROTOBUF_EXPORT Field final :
// int32 number = 3;
void clear_number();
- ::PROTOBUF_NAMESPACE_ID::int32 number() const;
- void set_number(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t number() const;
+ void set_number(int32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_number() const;
- void _internal_set_number(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t _internal_number() const;
+ void _internal_set_number(int32_t value);
public:
// int32 oneof_index = 7;
void clear_oneof_index();
- ::PROTOBUF_NAMESPACE_ID::int32 oneof_index() const;
- void set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t oneof_index() const;
+ void set_oneof_index(int32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_oneof_index() const;
- void _internal_set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t _internal_oneof_index() const;
+ void _internal_set_oneof_index(int32_t value);
public:
// bool packed = 8;
@@ -794,8 +794,8 @@ class PROTOBUF_EXPORT Field final :
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr default_value_;
int kind_;
int cardinality_;
- ::PROTOBUF_NAMESPACE_ID::int32 number_;
- ::PROTOBUF_NAMESPACE_ID::int32 oneof_index_;
+ int32_t number_;
+ int32_t oneof_index_;
bool packed_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_google_2fprotobuf_2ftype_2eproto;
@@ -895,8 +895,8 @@ class PROTOBUF_EXPORT Enum final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -1119,8 +1119,8 @@ class PROTOBUF_EXPORT EnumValue final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -1188,11 +1188,11 @@ class PROTOBUF_EXPORT EnumValue final :
// int32 number = 2;
void clear_number();
- ::PROTOBUF_NAMESPACE_ID::int32 number() const;
- void set_number(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t number() const;
+ void set_number(int32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_number() const;
- void _internal_set_number(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t _internal_number() const;
+ void _internal_set_number(int32_t value);
public:
// @@protoc_insertion_point(class_scope:google.protobuf.EnumValue)
@@ -1204,7 +1204,7 @@ class PROTOBUF_EXPORT EnumValue final :
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
- ::PROTOBUF_NAMESPACE_ID::int32 number_;
+ int32_t number_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_google_2fprotobuf_2ftype_2eproto;
};
@@ -1303,8 +1303,8 @@ class PROTOBUF_EXPORT Option final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -1435,6 +1435,11 @@ inline void Type::set_allocated_name(std::string* name) {
}
name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Type.name)
}
@@ -1747,18 +1752,18 @@ inline void Field::set_cardinality(::PROTOBUF_NAMESPACE_ID::Field_Cardinality va
inline void Field::clear_number() {
number_ = 0;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Field::_internal_number() const {
+inline int32_t Field::_internal_number() const {
return number_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Field::number() const {
+inline int32_t Field::number() const {
// @@protoc_insertion_point(field_get:google.protobuf.Field.number)
return _internal_number();
}
-inline void Field::_internal_set_number(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Field::_internal_set_number(int32_t value) {
number_ = value;
}
-inline void Field::set_number(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Field::set_number(int32_t value) {
_internal_set_number(value);
// @@protoc_insertion_point(field_set:google.protobuf.Field.number)
}
@@ -1806,6 +1811,11 @@ inline void Field::set_allocated_name(std::string* name) {
}
name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.name)
}
@@ -1852,6 +1862,11 @@ inline void Field::set_allocated_type_url(std::string* type_url) {
}
type_url_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), type_url,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (type_url_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.type_url)
}
@@ -1859,18 +1874,18 @@ inline void Field::set_allocated_type_url(std::string* type_url) {
inline void Field::clear_oneof_index() {
oneof_index_ = 0;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Field::_internal_oneof_index() const {
+inline int32_t Field::_internal_oneof_index() const {
return oneof_index_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Field::oneof_index() const {
+inline int32_t Field::oneof_index() const {
// @@protoc_insertion_point(field_get:google.protobuf.Field.oneof_index)
return _internal_oneof_index();
}
-inline void Field::_internal_set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Field::_internal_set_oneof_index(int32_t value) {
oneof_index_ = value;
}
-inline void Field::set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Field::set_oneof_index(int32_t value) {
_internal_set_oneof_index(value);
// @@protoc_insertion_point(field_set:google.protobuf.Field.oneof_index)
}
@@ -1978,6 +1993,11 @@ inline void Field::set_allocated_json_name(std::string* json_name) {
}
json_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), json_name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (json_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.json_name)
}
@@ -2024,6 +2044,11 @@ inline void Field::set_allocated_default_value(std::string* default_value) {
}
default_value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), default_value,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (default_value_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.default_value)
}
@@ -2074,6 +2099,11 @@ inline void Enum::set_allocated_name(std::string* name) {
}
name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Enum.name)
}
@@ -2310,6 +2340,11 @@ inline void EnumValue::set_allocated_name(std::string* name) {
}
name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValue.name)
}
@@ -2317,18 +2352,18 @@ inline void EnumValue::set_allocated_name(std::string* name) {
inline void EnumValue::clear_number() {
number_ = 0;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 EnumValue::_internal_number() const {
+inline int32_t EnumValue::_internal_number() const {
return number_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 EnumValue::number() const {
+inline int32_t EnumValue::number() const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumValue.number)
return _internal_number();
}
-inline void EnumValue::_internal_set_number(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void EnumValue::_internal_set_number(int32_t value) {
number_ = value;
}
-inline void EnumValue::set_number(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void EnumValue::set_number(int32_t value) {
_internal_set_number(value);
// @@protoc_insertion_point(field_set:google.protobuf.EnumValue.number)
}
@@ -2420,6 +2455,11 @@ inline void Option::set_allocated_name(std::string* name) {
}
name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Option.name)
}
diff --git a/src/google/protobuf/util/field_mask_util.h b/src/google/protobuf/util/field_mask_util.h
index 84cd1202e..dd8be8d3b 100644
--- a/src/google/protobuf/util/field_mask_util.h
+++ b/src/google/protobuf/util/field_mask_util.h
@@ -245,7 +245,7 @@ class PROTOBUF_EXPORT FieldMaskUtil::TrimOptions {
// When trimming message fields, the default behavior is to trim required
// fields of the present message if they are not specified in the field mask.
// If you instead want to keep required fields of the present message even
- // they are not specified in the field mask, set this flag to true.
+ // when they are not specified in the field mask, set this flag to true.
void set_keep_required_fields(bool value) { keep_required_fields_ = value; }
bool keep_required_fields() const { return keep_required_fields_; }
diff --git a/src/google/protobuf/wrappers.pb.cc b/src/google/protobuf/wrappers.pb.cc
index a3452f6e9..92758b567 100644
--- a/src/google/protobuf/wrappers.pb.cc
+++ b/src/google/protobuf/wrappers.pb.cc
@@ -130,7 +130,7 @@ static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fwrappers_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fwrappers_2eproto = nullptr;
-const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fwrappers_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
+const uint32_t TableStruct_google_2fprotobuf_2fwrappers_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DoubleValue, _internal_metadata_),
~0u, // no _extensions_
@@ -297,7 +297,7 @@ void DoubleValue::SetCachedSize(int size) const {
void DoubleValue::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.DoubleValue)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -308,12 +308,12 @@ void DoubleValue::Clear() {
const char* DoubleValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// double value = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 9)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 9)) {
value_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
ptr += sizeof(double);
} else
@@ -342,10 +342,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* DoubleValue::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* DoubleValue::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DoubleValue)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// double value = 1;
@@ -366,7 +366,7 @@ size_t DoubleValue::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.DoubleValue)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -394,7 +394,7 @@ void DoubleValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void DoubleValue::MergeFrom(const DoubleValue& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DoubleValue)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (!(from._internal_value() <= 0 && from._internal_value() >= 0)) {
@@ -475,7 +475,7 @@ void FloatValue::SetCachedSize(int size) const {
void FloatValue::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FloatValue)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -486,12 +486,12 @@ void FloatValue::Clear() {
const char* FloatValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// float value = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
value_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
@@ -520,10 +520,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* FloatValue::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* FloatValue::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FloatValue)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// float value = 1;
@@ -544,7 +544,7 @@ size_t FloatValue::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.FloatValue)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -572,7 +572,7 @@ void FloatValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void FloatValue::MergeFrom(const FloatValue& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FloatValue)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (!(from._internal_value() <= 0 && from._internal_value() >= 0)) {
@@ -653,7 +653,7 @@ void Int64Value::SetCachedSize(int size) const {
void Int64Value::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Int64Value)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -664,12 +664,12 @@ void Int64Value::Clear() {
const char* Int64Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// int64 value = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
@@ -698,10 +698,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* Int64Value::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* Int64Value::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Int64Value)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// int64 value = 1;
@@ -722,7 +722,7 @@ size_t Int64Value::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Int64Value)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -750,7 +750,7 @@ void Int64Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void Int64Value::MergeFrom(const Int64Value& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Int64Value)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_value() != 0) {
@@ -831,7 +831,7 @@ void UInt64Value::SetCachedSize(int size) const {
void UInt64Value::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.UInt64Value)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -842,12 +842,12 @@ void UInt64Value::Clear() {
const char* UInt64Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// uint64 value = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
@@ -876,10 +876,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* UInt64Value::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* UInt64Value::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UInt64Value)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// uint64 value = 1;
@@ -900,7 +900,7 @@ size_t UInt64Value::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.UInt64Value)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -928,7 +928,7 @@ void UInt64Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void UInt64Value::MergeFrom(const UInt64Value& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UInt64Value)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_value() != 0) {
@@ -1009,7 +1009,7 @@ void Int32Value::SetCachedSize(int size) const {
void Int32Value::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Int32Value)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1020,12 +1020,12 @@ void Int32Value::Clear() {
const char* Int32Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// int32 value = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
@@ -1054,10 +1054,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* Int32Value::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* Int32Value::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Int32Value)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// int32 value = 1;
@@ -1078,7 +1078,7 @@ size_t Int32Value::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Int32Value)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1106,7 +1106,7 @@ void Int32Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void Int32Value::MergeFrom(const Int32Value& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Int32Value)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_value() != 0) {
@@ -1187,7 +1187,7 @@ void UInt32Value::SetCachedSize(int size) const {
void UInt32Value::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.UInt32Value)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1198,12 +1198,12 @@ void UInt32Value::Clear() {
const char* UInt32Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// uint32 value = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
@@ -1232,10 +1232,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* UInt32Value::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* UInt32Value::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UInt32Value)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// uint32 value = 1;
@@ -1256,7 +1256,7 @@ size_t UInt32Value::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.UInt32Value)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1284,7 +1284,7 @@ void UInt32Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void UInt32Value::MergeFrom(const UInt32Value& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UInt32Value)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_value() != 0) {
@@ -1365,7 +1365,7 @@ void BoolValue::SetCachedSize(int size) const {
void BoolValue::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.BoolValue)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1376,12 +1376,12 @@ void BoolValue::Clear() {
const char* BoolValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// bool value = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
@@ -1410,10 +1410,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* BoolValue::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* BoolValue::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.BoolValue)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// bool value = 1;
@@ -1434,7 +1434,7 @@ size_t BoolValue::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.BoolValue)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1462,7 +1462,7 @@ void BoolValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void BoolValue::MergeFrom(const BoolValue& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.BoolValue)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_value() != 0) {
@@ -1513,6 +1513,9 @@ StringValue::StringValue(const StringValue& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_value().empty()) {
value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_value(),
GetArenaForAllocation());
@@ -1522,6 +1525,9 @@ StringValue::StringValue(const StringValue& from)
inline void StringValue::SharedCtor() {
value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
StringValue::~StringValue() {
@@ -1548,7 +1554,7 @@ void StringValue::SetCachedSize(int size) const {
void StringValue::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.StringValue)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1559,12 +1565,12 @@ void StringValue::Clear() {
const char* StringValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// string value = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_value();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.StringValue.value"));
@@ -1595,10 +1601,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* StringValue::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* StringValue::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.StringValue)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// string value = 1;
@@ -1623,7 +1629,7 @@ size_t StringValue::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.StringValue)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1653,7 +1659,7 @@ void StringValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void StringValue::MergeFrom(const StringValue& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.StringValue)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_value().empty()) {
@@ -1710,6 +1716,9 @@ BytesValue::BytesValue(const BytesValue& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_value().empty()) {
value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_value(),
GetArenaForAllocation());
@@ -1719,6 +1728,9 @@ BytesValue::BytesValue(const BytesValue& from)
inline void BytesValue::SharedCtor() {
value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
BytesValue::~BytesValue() {
@@ -1745,7 +1757,7 @@ void BytesValue::SetCachedSize(int size) const {
void BytesValue::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.BytesValue)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1756,12 +1768,12 @@ void BytesValue::Clear() {
const char* BytesValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
+ uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// bytes value = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
+ if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_value();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
@@ -1791,10 +1803,10 @@ failure:
#undef CHK_
}
-::PROTOBUF_NAMESPACE_ID::uint8* BytesValue::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
+uint8_t* BytesValue::_InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.BytesValue)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// bytes value = 1;
@@ -1815,7 +1827,7 @@ size_t BytesValue::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.BytesValue)
size_t total_size = 0;
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
@@ -1845,7 +1857,7 @@ void BytesValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
void BytesValue::MergeFrom(const BytesValue& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.BytesValue)
GOOGLE_DCHECK_NE(&from, this);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
+ uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_value().empty()) {
diff --git a/src/google/protobuf/wrappers.pb.h b/src/google/protobuf/wrappers.pb.h
index 729d0d048..1768f7d79 100644
--- a/src/google/protobuf/wrappers.pb.h
+++ b/src/google/protobuf/wrappers.pb.h
@@ -50,7 +50,7 @@ struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fwrappers_2eproto {
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
- static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
+ static const uint32_t offsets[];
};
PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fwrappers_2eproto;
PROTOBUF_NAMESPACE_OPEN
@@ -190,8 +190,8 @@ class PROTOBUF_EXPORT DoubleValue final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -338,8 +338,8 @@ class PROTOBUF_EXPORT FloatValue final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -486,8 +486,8 @@ class PROTOBUF_EXPORT Int64Value final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -521,11 +521,11 @@ class PROTOBUF_EXPORT Int64Value final :
};
// int64 value = 1;
void clear_value();
- ::PROTOBUF_NAMESPACE_ID::int64 value() const;
- void set_value(::PROTOBUF_NAMESPACE_ID::int64 value);
+ int64_t value() const;
+ void set_value(int64_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int64 _internal_value() const;
- void _internal_set_value(::PROTOBUF_NAMESPACE_ID::int64 value);
+ int64_t _internal_value() const;
+ void _internal_set_value(int64_t value);
public:
// @@protoc_insertion_point(class_scope:google.protobuf.Int64Value)
@@ -535,7 +535,7 @@ class PROTOBUF_EXPORT Int64Value final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::int64 value_;
+ int64_t value_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto;
};
@@ -634,8 +634,8 @@ class PROTOBUF_EXPORT UInt64Value final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -669,11 +669,11 @@ class PROTOBUF_EXPORT UInt64Value final :
};
// uint64 value = 1;
void clear_value();
- ::PROTOBUF_NAMESPACE_ID::uint64 value() const;
- void set_value(::PROTOBUF_NAMESPACE_ID::uint64 value);
+ uint64_t value() const;
+ void set_value(uint64_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::uint64 _internal_value() const;
- void _internal_set_value(::PROTOBUF_NAMESPACE_ID::uint64 value);
+ uint64_t _internal_value() const;
+ void _internal_set_value(uint64_t value);
public:
// @@protoc_insertion_point(class_scope:google.protobuf.UInt64Value)
@@ -683,7 +683,7 @@ class PROTOBUF_EXPORT UInt64Value final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::uint64 value_;
+ uint64_t value_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto;
};
@@ -782,8 +782,8 @@ class PROTOBUF_EXPORT Int32Value final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -817,11 +817,11 @@ class PROTOBUF_EXPORT Int32Value final :
};
// int32 value = 1;
void clear_value();
- ::PROTOBUF_NAMESPACE_ID::int32 value() const;
- void set_value(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t value() const;
+ void set_value(int32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_value() const;
- void _internal_set_value(::PROTOBUF_NAMESPACE_ID::int32 value);
+ int32_t _internal_value() const;
+ void _internal_set_value(int32_t value);
public:
// @@protoc_insertion_point(class_scope:google.protobuf.Int32Value)
@@ -831,7 +831,7 @@ class PROTOBUF_EXPORT Int32Value final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::int32 value_;
+ int32_t value_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto;
};
@@ -930,8 +930,8 @@ class PROTOBUF_EXPORT UInt32Value final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -965,11 +965,11 @@ class PROTOBUF_EXPORT UInt32Value final :
};
// uint32 value = 1;
void clear_value();
- ::PROTOBUF_NAMESPACE_ID::uint32 value() const;
- void set_value(::PROTOBUF_NAMESPACE_ID::uint32 value);
+ uint32_t value() const;
+ void set_value(uint32_t value);
private:
- ::PROTOBUF_NAMESPACE_ID::uint32 _internal_value() const;
- void _internal_set_value(::PROTOBUF_NAMESPACE_ID::uint32 value);
+ uint32_t _internal_value() const;
+ void _internal_set_value(uint32_t value);
public:
// @@protoc_insertion_point(class_scope:google.protobuf.UInt32Value)
@@ -979,7 +979,7 @@ class PROTOBUF_EXPORT UInt32Value final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::uint32 value_;
+ uint32_t value_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto;
};
@@ -1078,8 +1078,8 @@ class PROTOBUF_EXPORT BoolValue final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -1226,8 +1226,8 @@ class PROTOBUF_EXPORT StringValue final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -1379,8 +1379,8 @@ class PROTOBUF_EXPORT BytesValue final :
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
- ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
+ uint8_t* _InternalSerialize(
+ uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
@@ -1500,18 +1500,18 @@ inline void FloatValue::set_value(float value) {
inline void Int64Value::clear_value() {
value_ = int64_t{0};
}
-inline ::PROTOBUF_NAMESPACE_ID::int64 Int64Value::_internal_value() const {
+inline int64_t Int64Value::_internal_value() const {
return value_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int64 Int64Value::value() const {
+inline int64_t Int64Value::value() const {
// @@protoc_insertion_point(field_get:google.protobuf.Int64Value.value)
return _internal_value();
}
-inline void Int64Value::_internal_set_value(::PROTOBUF_NAMESPACE_ID::int64 value) {
+inline void Int64Value::_internal_set_value(int64_t value) {
value_ = value;
}
-inline void Int64Value::set_value(::PROTOBUF_NAMESPACE_ID::int64 value) {
+inline void Int64Value::set_value(int64_t value) {
_internal_set_value(value);
// @@protoc_insertion_point(field_set:google.protobuf.Int64Value.value)
}
@@ -1524,18 +1524,18 @@ inline void Int64Value::set_value(::PROTOBUF_NAMESPACE_ID::int64 value) {
inline void UInt64Value::clear_value() {
value_ = uint64_t{0u};
}
-inline ::PROTOBUF_NAMESPACE_ID::uint64 UInt64Value::_internal_value() const {
+inline uint64_t UInt64Value::_internal_value() const {
return value_;
}
-inline ::PROTOBUF_NAMESPACE_ID::uint64 UInt64Value::value() const {
+inline uint64_t UInt64Value::value() const {
// @@protoc_insertion_point(field_get:google.protobuf.UInt64Value.value)
return _internal_value();
}
-inline void UInt64Value::_internal_set_value(::PROTOBUF_NAMESPACE_ID::uint64 value) {
+inline void UInt64Value::_internal_set_value(uint64_t value) {
value_ = value;
}
-inline void UInt64Value::set_value(::PROTOBUF_NAMESPACE_ID::uint64 value) {
+inline void UInt64Value::set_value(uint64_t value) {
_internal_set_value(value);
// @@protoc_insertion_point(field_set:google.protobuf.UInt64Value.value)
}
@@ -1548,18 +1548,18 @@ inline void UInt64Value::set_value(::PROTOBUF_NAMESPACE_ID::uint64 value) {
inline void Int32Value::clear_value() {
value_ = 0;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Int32Value::_internal_value() const {
+inline int32_t Int32Value::_internal_value() const {
return value_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Int32Value::value() const {
+inline int32_t Int32Value::value() const {
// @@protoc_insertion_point(field_get:google.protobuf.Int32Value.value)
return _internal_value();
}
-inline void Int32Value::_internal_set_value(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Int32Value::_internal_set_value(int32_t value) {
value_ = value;
}
-inline void Int32Value::set_value(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Int32Value::set_value(int32_t value) {
_internal_set_value(value);
// @@protoc_insertion_point(field_set:google.protobuf.Int32Value.value)
}
@@ -1572,18 +1572,18 @@ inline void Int32Value::set_value(::PROTOBUF_NAMESPACE_ID::int32 value) {
inline void UInt32Value::clear_value() {
value_ = 0u;
}
-inline ::PROTOBUF_NAMESPACE_ID::uint32 UInt32Value::_internal_value() const {
+inline uint32_t UInt32Value::_internal_value() const {
return value_;
}
-inline ::PROTOBUF_NAMESPACE_ID::uint32 UInt32Value::value() const {
+inline uint32_t UInt32Value::value() const {
// @@protoc_insertion_point(field_get:google.protobuf.UInt32Value.value)
return _internal_value();
}
-inline void UInt32Value::_internal_set_value(::PROTOBUF_NAMESPACE_ID::uint32 value) {
+inline void UInt32Value::_internal_set_value(uint32_t value) {
value_ = value;
}
-inline void UInt32Value::set_value(::PROTOBUF_NAMESPACE_ID::uint32 value) {
+inline void UInt32Value::set_value(uint32_t value) {
_internal_set_value(value);
// @@protoc_insertion_point(field_set:google.protobuf.UInt32Value.value)
}
@@ -1659,6 +1659,11 @@ inline void StringValue::set_allocated_value(std::string* value) {
}
value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (value_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.StringValue.value)
}
@@ -1709,6 +1714,11 @@ inline void BytesValue::set_allocated_value(std::string* value) {
}
value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value,
GetArenaForAllocation());
+#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ if (value_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
+ value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
+ }
+#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.BytesValue.value)
}