Index: third_party/protobuf/patches/02_unknown_fields_in_protobuf_lite.patch |
diff --git a/third_party/protobuf/patches/02_unknown_fields_in_protobuf_lite.patch b/third_party/protobuf/patches/02_unknown_fields_in_protobuf_lite.patch |
deleted file mode 100644 |
index 966e564c5f66b1610a31e1e7df66e3169ec94f44..0000000000000000000000000000000000000000 |
--- a/third_party/protobuf/patches/02_unknown_fields_in_protobuf_lite.patch |
+++ /dev/null |
@@ -1,3408 +0,0 @@ |
-diff --git a/third_party/protobuf/BUILD.gn b/third_party/protobuf/BUILD.gn |
-index 1c2c85e..aaeae89 100644 |
---- a/third_party/protobuf/BUILD.gn |
-+++ b/third_party/protobuf/BUILD.gn |
-@@ -104,6 +104,7 @@ protobuf_lite_sources = [ |
- "src/google/protobuf/stubs/time.h", |
- "src/google/protobuf/stubs/type_traits.h", |
- "src/google/protobuf/testing/googletest.h", |
-+ "src/google/protobuf/unknown_field_set.cc", |
- "src/google/protobuf/unknown_field_set.h", |
- "src/google/protobuf/wire_format_lite.cc", |
- "src/google/protobuf/wire_format_lite.h", |
-@@ -220,7 +221,6 @@ source_set("protobuf_full") { |
- "src/google/protobuf/timestamp.pb.h", |
- "src/google/protobuf/type.pb.cc", |
- "src/google/protobuf/type.pb.h", |
-- "src/google/protobuf/unknown_field_set.cc", |
- "src/google/protobuf/util/field_comparator.cc", |
- "src/google/protobuf/util/field_comparator.h", |
- "src/google/protobuf/util/internal/constants.h", |
-diff --git a/third_party/protobuf/README.chromium b/third_party/protobuf/README.chromium |
-index da9f26f..aa428ad 100644 |
---- a/third_party/protobuf/README.chromium |
-+++ b/third_party/protobuf/README.chromium |
-@@ -22,6 +22,12 @@ Steps used to create the current version: |
- 01: Miscellaneous build fixes to make the upstream sources compile. At this |
- point you should be able to build the protobuf_* and protoc targets (but |
- not necessarily anything depending on them). |
-+ 02: Add unknown field retention to protobuf_lite. This is a large and complex |
-+ patch which will likely require reworking to apply correctly. Changes to |
-+ .pb.* files can likely be autogenerated once you apply the rest of the |
-+ patch and rebuild protoc; look at step (3) below and the |
-+ generate_descriptor_proto.sh script in the protobuf root directory for a |
-+ guide. Based on http://crrev.com/62331 and http://crrev.com/173228 . |
- (3) Generate descriptor_pb2.py using something like the following steps. Make |
- sure you've regenerated your buildfiles and will build protoc from the |
- newly-modified sources above. |
-diff --git a/third_party/protobuf/protobuf.gyp b/third_party/protobuf/protobuf.gyp |
-index e839ad7..9fba350 100644 |
---- a/third_party/protobuf/protobuf.gyp |
-+++ b/third_party/protobuf/protobuf.gyp |
-@@ -178,7 +178,6 @@ |
- 'src/google/protobuf/timestamp.pb.h', |
- 'src/google/protobuf/type.pb.cc', |
- 'src/google/protobuf/type.pb.h', |
-- 'src/google/protobuf/unknown_field_set.cc', |
- 'src/google/protobuf/util/field_comparator.cc', |
- 'src/google/protobuf/util/field_comparator.h', |
- 'src/google/protobuf/util/internal/constants.h', |
-diff --git a/third_party/protobuf/protobuf_lite.gypi b/third_party/protobuf/protobuf_lite.gypi |
-index 90fe65b..6415ab2 100644 |
---- a/third_party/protobuf/protobuf_lite.gypi |
-+++ b/third_party/protobuf/protobuf_lite.gypi |
-@@ -80,6 +80,7 @@ |
- 'src/google/protobuf/stubs/time.h', |
- 'src/google/protobuf/stubs/type_traits.h', |
- 'src/google/protobuf/testing/googletest.h', |
-+ 'src/google/protobuf/unknown_field_set.cc', |
- 'src/google/protobuf/unknown_field_set.h', |
- 'src/google/protobuf/wire_format_lite.cc', |
- 'src/google/protobuf/wire_format_lite.h', |
-diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc |
-index 965327b..8c21ed2 100644 |
---- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc |
-+++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc |
-@@ -365,7 +365,7 @@ GenerateMergeFromCodedStreamWithPacking(io::Printer* printer) const { |
- " this->mutable_$name$())));\n"); |
- } else if (UseUnknownFieldSet(descriptor_->file())) { |
- printer->Print(variables_, |
-- "DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(\n" |
-+ "DO_((::google::protobuf::internal::WireFormatLite::ReadPackedEnumPreserveUnknowns(\n" |
- " input,\n" |
- " $number$,\n" |
- " $type$_IsValid,\n" |
-diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h |
-index 4bbf830..5029954 100644 |
---- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h |
-+++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h |
-@@ -166,7 +166,8 @@ inline bool PreserveUnknownFields(const Descriptor* message) { |
- // If PreserveUnknownFields() is false, this method will not be |
- // used. |
- inline bool UseUnknownFieldSet(const FileDescriptor* file) { |
-- return file->options().optimize_for() != FileOptions::LITE_RUNTIME; |
-+ return file->options().optimize_for() != FileOptions::LITE_RUNTIME || |
-+ file->options().retain_unknown_fields(); |
- } |
- |
- |
-diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc |
-index b0e3875..4909d0f 100644 |
---- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc |
-+++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc |
-@@ -3116,7 +3116,7 @@ GenerateMergeFromCodedStream(io::Printer* printer) { |
- if (PreserveUnknownFields(descriptor_)) { |
- if (UseUnknownFieldSet(descriptor_->file())) { |
- printer->Print( |
-- "DO_(::google::protobuf::internal::WireFormat::SkipField(\n" |
-+ "DO_(::google::protobuf::internal::WireFormatLite::SkipField(\n" |
- " input, tag, mutable_unknown_fields()));\n"); |
- } else { |
- printer->Print( |
-@@ -3209,7 +3209,7 @@ GenerateSerializeWithCachedSizes(io::Printer* printer) { |
- "classname", classname_); |
- GOOGLE_CHECK(UseUnknownFieldSet(descriptor_->file())); |
- printer->Print( |
-- " ::google::protobuf::internal::WireFormat::SerializeUnknownMessageSetItems(\n" |
-+ " ::google::protobuf::internal::WireFormatLite::SerializeUnknownMessageSetItems(\n" |
- " unknown_fields(), output);\n"); |
- printer->Print( |
- "}\n"); |
-@@ -3249,7 +3249,7 @@ GenerateSerializeWithCachedSizesToArray(io::Printer* printer) { |
- "classname", classname_); |
- GOOGLE_CHECK(UseUnknownFieldSet(descriptor_->file())); |
- printer->Print( |
-- " target = ::google::protobuf::internal::WireFormat::\n" |
-+ " target = ::google::protobuf::internal::WireFormatLite::\n" |
- " SerializeUnknownMessageSetItemsToArray(\n" |
- " unknown_fields(), target);\n"); |
- printer->Print( |
-@@ -3319,11 +3319,11 @@ GenerateSerializeWithCachedSizesBody(io::Printer* printer, bool to_array) { |
- if (to_array) { |
- printer->Print( |
- "target = " |
-- "::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(\n" |
-+ "::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray(\n" |
- " unknown_fields(), target);\n"); |
- } else { |
- printer->Print( |
-- "::google::protobuf::internal::WireFormat::SerializeUnknownFields(\n" |
-+ "::google::protobuf::internal::WireFormatLite::SerializeUnknownFields(\n" |
- " unknown_fields(), output);\n"); |
- } |
- printer->Outdent(); |
-@@ -3386,7 +3386,7 @@ GenerateByteSize(io::Printer* printer) { |
- GOOGLE_CHECK(UseUnknownFieldSet(descriptor_->file())); |
- printer->Print( |
- "if (_internal_metadata_.have_unknown_fields()) {\n" |
-- " total_size += ::google::protobuf::internal::WireFormat::\n" |
-+ " total_size += ::google::protobuf::internal::WireFormatLite::\n" |
- " ComputeUnknownMessageSetItemsSize(unknown_fields());\n" |
- "}\n"); |
- printer->Print( |
-@@ -3607,7 +3607,7 @@ GenerateByteSize(io::Printer* printer) { |
- printer->Print( |
- "if (_internal_metadata_.have_unknown_fields()) {\n" |
- " total_size +=\n" |
-- " ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(\n" |
-+ " ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize(\n" |
- " unknown_fields());\n" |
- "}\n"); |
- } else { |
-diff --git a/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc b/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc |
-index e7890fa..29e3590 100644 |
---- a/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc |
-+++ b/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc |
-@@ -320,7 +320,7 @@ bool CodeGeneratorRequest::MergePartialFromCodedStream( |
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
- goto success; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -365,7 +365,7 @@ void CodeGeneratorRequest::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorRequest) |
-@@ -403,7 +403,7 @@ void CodeGeneratorRequest::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorRequest) |
-@@ -437,7 +437,7 @@ int CodeGeneratorRequest::ByteSize() const { |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -811,7 +811,7 @@ bool CodeGeneratorResponse_File::MergePartialFromCodedStream( |
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
- goto success; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -860,7 +860,7 @@ void CodeGeneratorResponse_File::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorResponse.File) |
-@@ -903,7 +903,7 @@ void CodeGeneratorResponse_File::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorResponse.File) |
-@@ -938,7 +938,7 @@ int CodeGeneratorResponse_File::ByteSize() const { |
- } |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -1147,7 +1147,7 @@ bool CodeGeneratorResponse::MergePartialFromCodedStream( |
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
- goto success; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -1182,7 +1182,7 @@ void CodeGeneratorResponse::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorResponse) |
-@@ -1210,7 +1210,7 @@ void CodeGeneratorResponse::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorResponse) |
-@@ -1237,7 +1237,7 @@ int CodeGeneratorResponse::ByteSize() const { |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-diff --git a/third_party/protobuf/src/google/protobuf/descriptor.cc b/third_party/protobuf/src/google/protobuf/descriptor.cc |
-index 2855c37..36e42a6 100644 |
---- a/third_party/protobuf/src/google/protobuf/descriptor.cc |
-+++ b/third_party/protobuf/src/google/protobuf/descriptor.cc |
-@@ -5600,7 +5600,7 @@ bool DescriptorBuilder::OptionInterpreter::InterpretSingleOption( |
- io::StringOutputStream outstr( |
- parent_unknown_fields->AddLengthDelimited((*iter)->number())); |
- io::CodedOutputStream out(&outstr); |
-- internal::WireFormat::SerializeUnknownFields(*unknown_fields, &out); |
-+ internal::WireFormatLite::SerializeUnknownFields(*unknown_fields, &out); |
- GOOGLE_CHECK(!out.HadError()) |
- << "Unexpected failure while serializing option submessage " |
- << debug_msg_name << "\"."; |
-diff --git a/third_party/protobuf/src/google/protobuf/descriptor.pb.cc b/third_party/protobuf/src/google/protobuf/descriptor.pb.cc |
-index 5e7eeaa..f53e604 100644 |
---- a/third_party/protobuf/src/google/protobuf/descriptor.pb.cc |
-+++ b/third_party/protobuf/src/google/protobuf/descriptor.pb.cc |
-@@ -311,10 +311,11 @@ void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto() { |
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, _internal_metadata_), |
- -1); |
- FileOptions_descriptor_ = file->message_type(9); |
-- static const int FileOptions_offsets_[16] = { |
-+ static const int FileOptions_offsets_[17] = { |
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_package_), |
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_outer_classname_), |
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_multiple_files_), |
-+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, retain_unknown_fields_), |
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_generate_equals_and_hash_), |
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_string_check_utf8_), |
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, optimize_for_), |
-@@ -696,68 +697,69 @@ void protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto() { |
- "_type\030\002 \001(\t\022\023\n\013output_type\030\003 \001(\t\022/\n\007opti" |
- "ons\030\004 \001(\0132\036.google.protobuf.MethodOption" |
- "s\022\037\n\020client_streaming\030\005 \001(\010:\005false\022\037\n\020se" |
-- "rver_streaming\030\006 \001(\010:\005false\"\252\005\n\013FileOpti" |
-+ "rver_streaming\030\006 \001(\010:\005false\"\320\005\n\013FileOpti" |
- "ons\022\024\n\014java_package\030\001 \001(\t\022\034\n\024java_outer_" |
- "classname\030\010 \001(\t\022\"\n\023java_multiple_files\030\n" |
-- " \001(\010:\005false\022,\n\035java_generate_equals_and_" |
-- "hash\030\024 \001(\010:\005false\022%\n\026java_string_check_u" |
-- "tf8\030\033 \001(\010:\005false\022F\n\014optimize_for\030\t \001(\0162)" |
-- ".google.protobuf.FileOptions.OptimizeMod" |
-- "e:\005SPEED\022\022\n\ngo_package\030\013 \001(\t\022\"\n\023cc_gener" |
-- "ic_services\030\020 \001(\010:\005false\022$\n\025java_generic" |
-- "_services\030\021 \001(\010:\005false\022\"\n\023py_generic_ser" |
-- "vices\030\022 \001(\010:\005false\022\031\n\ndeprecated\030\027 \001(\010:\005" |
-- "false\022\037\n\020cc_enable_arenas\030\037 \001(\010:\005false\022\031" |
-- "\n\021objc_class_prefix\030$ \001(\t\022\030\n\020csharp_name" |
-- "space\030% \001(\t\022\'\n\037javanano_use_deprecated_p" |
-- "ackage\030& \001(\010\022C\n\024uninterpreted_option\030\347\007 " |
-- "\003(\0132$.google.protobuf.UninterpretedOptio" |
-- "n\":\n\014OptimizeMode\022\t\n\005SPEED\020\001\022\r\n\tCODE_SIZ" |
-- "E\020\002\022\020\n\014LITE_RUNTIME\020\003*\t\010\350\007\020\200\200\200\200\002\"\346\001\n\016Mes" |
-- "sageOptions\022&\n\027message_set_wire_format\030\001" |
-- " \001(\010:\005false\022.\n\037no_standard_descriptor_ac" |
-- "cessor\030\002 \001(\010:\005false\022\031\n\ndeprecated\030\003 \001(\010:" |
-- "\005false\022\021\n\tmap_entry\030\007 \001(\010\022C\n\024uninterpret" |
-+ " \001(\010:\005false\022$\n\025retain_unknown_fields\030\014 \001" |
-+ "(\010:\005false\022,\n\035java_generate_equals_and_ha" |
-+ "sh\030\024 \001(\010:\005false\022%\n\026java_string_check_utf" |
-+ "8\030\033 \001(\010:\005false\022F\n\014optimize_for\030\t \001(\0162).g" |
-+ "oogle.protobuf.FileOptions.OptimizeMode:" |
-+ "\005SPEED\022\022\n\ngo_package\030\013 \001(\t\022\"\n\023cc_generic" |
-+ "_services\030\020 \001(\010:\005false\022$\n\025java_generic_s" |
-+ "ervices\030\021 \001(\010:\005false\022\"\n\023py_generic_servi" |
-+ "ces\030\022 \001(\010:\005false\022\031\n\ndeprecated\030\027 \001(\010:\005fa" |
-+ "lse\022\037\n\020cc_enable_arenas\030\037 \001(\010:\005false\022\031\n\021" |
-+ "objc_class_prefix\030$ \001(\t\022\030\n\020csharp_namesp" |
-+ "ace\030% \001(\t\022\'\n\037javanano_use_deprecated_pac" |
-+ "kage\030& \001(\010\022C\n\024uninterpreted_option\030\347\007 \003(" |
-+ "\0132$.google.protobuf.UninterpretedOption\"" |
-+ ":\n\014OptimizeMode\022\t\n\005SPEED\020\001\022\r\n\tCODE_SIZE\020" |
-+ "\002\022\020\n\014LITE_RUNTIME\020\003*\t\010\350\007\020\200\200\200\200\002\"\346\001\n\016Messa" |
-+ "geOptions\022&\n\027message_set_wire_format\030\001 \001" |
-+ "(\010:\005false\022.\n\037no_standard_descriptor_acce" |
-+ "ssor\030\002 \001(\010:\005false\022\031\n\ndeprecated\030\003 \001(\010:\005f" |
-+ "alse\022\021\n\tmap_entry\030\007 \001(\010\022C\n\024uninterpreted" |
-+ "_option\030\347\007 \003(\0132$.google.protobuf.Uninter" |
-+ "pretedOption*\t\010\350\007\020\200\200\200\200\002\"\230\003\n\014FieldOptions" |
-+ "\022:\n\005ctype\030\001 \001(\0162#.google.protobuf.FieldO" |
-+ "ptions.CType:\006STRING\022\016\n\006packed\030\002 \001(\010\022\?\n\006" |
-+ "jstype\030\006 \001(\0162$.google.protobuf.FieldOpti" |
-+ "ons.JSType:\tJS_NORMAL\022\023\n\004lazy\030\005 \001(\010:\005fal" |
-+ "se\022\031\n\ndeprecated\030\003 \001(\010:\005false\022\023\n\004weak\030\n " |
-+ "\001(\010:\005false\022C\n\024uninterpreted_option\030\347\007 \003(" |
-+ "\0132$.google.protobuf.UninterpretedOption\"" |
-+ "/\n\005CType\022\n\n\006STRING\020\000\022\010\n\004CORD\020\001\022\020\n\014STRING" |
-+ "_PIECE\020\002\"5\n\006JSType\022\r\n\tJS_NORMAL\020\000\022\r\n\tJS_" |
-+ "STRING\020\001\022\r\n\tJS_NUMBER\020\002*\t\010\350\007\020\200\200\200\200\002\"\215\001\n\013E" |
-+ "numOptions\022\023\n\013allow_alias\030\002 \001(\010\022\031\n\ndepre" |
-+ "cated\030\003 \001(\010:\005false\022C\n\024uninterpreted_opti" |
-+ "on\030\347\007 \003(\0132$.google.protobuf.Uninterprete" |
-+ "dOption*\t\010\350\007\020\200\200\200\200\002\"}\n\020EnumValueOptions\022\031" |
-+ "\n\ndeprecated\030\001 \001(\010:\005false\022C\n\024uninterpret" |
- "ed_option\030\347\007 \003(\0132$.google.protobuf.Unint" |
-- "erpretedOption*\t\010\350\007\020\200\200\200\200\002\"\230\003\n\014FieldOptio" |
-- "ns\022:\n\005ctype\030\001 \001(\0162#.google.protobuf.Fiel" |
-- "dOptions.CType:\006STRING\022\016\n\006packed\030\002 \001(\010\022\?" |
-- "\n\006jstype\030\006 \001(\0162$.google.protobuf.FieldOp" |
-- "tions.JSType:\tJS_NORMAL\022\023\n\004lazy\030\005 \001(\010:\005f" |
-- "alse\022\031\n\ndeprecated\030\003 \001(\010:\005false\022\023\n\004weak\030" |
-- "\n \001(\010:\005false\022C\n\024uninterpreted_option\030\347\007 " |
-- "\003(\0132$.google.protobuf.UninterpretedOptio" |
-- "n\"/\n\005CType\022\n\n\006STRING\020\000\022\010\n\004CORD\020\001\022\020\n\014STRI" |
-- "NG_PIECE\020\002\"5\n\006JSType\022\r\n\tJS_NORMAL\020\000\022\r\n\tJ" |
-- "S_STRING\020\001\022\r\n\tJS_NUMBER\020\002*\t\010\350\007\020\200\200\200\200\002\"\215\001\n" |
-- "\013EnumOptions\022\023\n\013allow_alias\030\002 \001(\010\022\031\n\ndep" |
-- "recated\030\003 \001(\010:\005false\022C\n\024uninterpreted_op" |
-- "tion\030\347\007 \003(\0132$.google.protobuf.Uninterpre" |
-- "tedOption*\t\010\350\007\020\200\200\200\200\002\"}\n\020EnumValueOptions" |
-- "\022\031\n\ndeprecated\030\001 \001(\010:\005false\022C\n\024uninterpr" |
-- "eted_option\030\347\007 \003(\0132$.google.protobuf.Uni" |
-- "nterpretedOption*\t\010\350\007\020\200\200\200\200\002\"{\n\016ServiceOp" |
-- "tions\022\031\n\ndeprecated\030! \001(\010:\005false\022C\n\024unin" |
-- "terpreted_option\030\347\007 \003(\0132$.google.protobu" |
-- "f.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"z\n\rMeth" |
-- "odOptions\022\031\n\ndeprecated\030! \001(\010:\005false\022C\n\024" |
-- "uninterpreted_option\030\347\007 \003(\0132$.google.pro" |
-- "tobuf.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"\236\002\n" |
-- "\023UninterpretedOption\022;\n\004name\030\002 \003(\0132-.goo" |
-- "gle.protobuf.UninterpretedOption.NamePar" |
-- "t\022\030\n\020identifier_value\030\003 \001(\t\022\032\n\022positive_" |
-- "int_value\030\004 \001(\004\022\032\n\022negative_int_value\030\005 " |
-- "\001(\003\022\024\n\014double_value\030\006 \001(\001\022\024\n\014string_valu" |
-- "e\030\007 \001(\014\022\027\n\017aggregate_value\030\010 \001(\t\0323\n\010Name" |
-- "Part\022\021\n\tname_part\030\001 \002(\t\022\024\n\014is_extension\030" |
-- "\002 \002(\010\"\325\001\n\016SourceCodeInfo\022:\n\010location\030\001 \003" |
-- "(\0132(.google.protobuf.SourceCodeInfo.Loca" |
-- "tion\032\206\001\n\010Location\022\020\n\004path\030\001 \003(\005B\002\020\001\022\020\n\004s" |
-- "pan\030\002 \003(\005B\002\020\001\022\030\n\020leading_comments\030\003 \001(\t\022" |
-- "\031\n\021trailing_comments\030\004 \001(\t\022!\n\031leading_de" |
-- "tached_comments\030\006 \003(\tB[\n\023com.google.prot" |
-- "obufB\020DescriptorProtosH\001Z\ndescriptor\242\002\003G" |
-- "PB\252\002\032Google.Protobuf.Reflection\260\002\001", 4994); |
-+ "erpretedOption*\t\010\350\007\020\200\200\200\200\002\"{\n\016ServiceOpti" |
-+ "ons\022\031\n\ndeprecated\030! \001(\010:\005false\022C\n\024uninte" |
-+ "rpreted_option\030\347\007 \003(\0132$.google.protobuf." |
-+ "UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"z\n\rMethod" |
-+ "Options\022\031\n\ndeprecated\030! \001(\010:\005false\022C\n\024un" |
-+ "interpreted_option\030\347\007 \003(\0132$.google.proto" |
-+ "buf.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"\236\002\n\023U" |
-+ "ninterpretedOption\022;\n\004name\030\002 \003(\0132-.googl" |
-+ "e.protobuf.UninterpretedOption.NamePart\022" |
-+ "\030\n\020identifier_value\030\003 \001(\t\022\032\n\022positive_in" |
-+ "t_value\030\004 \001(\004\022\032\n\022negative_int_value\030\005 \001(" |
-+ "\003\022\024\n\014double_value\030\006 \001(\001\022\024\n\014string_value\030" |
-+ "\007 \001(\014\022\027\n\017aggregate_value\030\010 \001(\t\0323\n\010NamePa" |
-+ "rt\022\021\n\tname_part\030\001 \002(\t\022\024\n\014is_extension\030\002 " |
-+ "\002(\010\"\325\001\n\016SourceCodeInfo\022:\n\010location\030\001 \003(\013" |
-+ "2(.google.protobuf.SourceCodeInfo.Locati" |
-+ "on\032\206\001\n\010Location\022\020\n\004path\030\001 \003(\005B\002\020\001\022\020\n\004spa" |
-+ "n\030\002 \003(\005B\002\020\001\022\030\n\020leading_comments\030\003 \001(\t\022\031\n" |
-+ "\021trailing_comments\030\004 \001(\t\022!\n\031leading_deta" |
-+ "ched_comments\030\006 \003(\tB[\n\023com.google.protob" |
-+ "ufB\020DescriptorProtosH\001Z\ndescriptor\242\002\003GPB" |
-+ "\252\002\032Google.Protobuf.Reflection\260\002\001", 5032); |
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( |
- "google/protobuf/descriptor.proto", &protobuf_RegisterTypes); |
- FileDescriptorSet::default_instance_ = new FileDescriptorSet(); |
-@@ -928,7 +930,7 @@ bool FileDescriptorSet::MergePartialFromCodedStream( |
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
- goto success; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -953,7 +955,7 @@ void FileDescriptorSet::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.FileDescriptorSet) |
-@@ -970,7 +972,7 @@ void FileDescriptorSet::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileDescriptorSet) |
-@@ -990,7 +992,7 @@ int FileDescriptorSet::ByteSize() const { |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -1426,7 +1428,7 @@ bool FileDescriptorProto::MergePartialFromCodedStream( |
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
- goto success; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -1533,7 +1535,7 @@ void FileDescriptorProto::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.FileDescriptorProto) |
-@@ -1640,7 +1642,7 @@ void FileDescriptorProto::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileDescriptorProto) |
-@@ -1750,7 +1752,7 @@ int FileDescriptorProto::ByteSize() const { |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -2477,7 +2479,7 @@ bool DescriptorProto_ExtensionRange::MergePartialFromCodedStream( |
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
- goto success; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -2506,7 +2508,7 @@ void DescriptorProto_ExtensionRange::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto.ExtensionRange) |
-@@ -2526,7 +2528,7 @@ void DescriptorProto_ExtensionRange::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto.ExtensionRange) |
-@@ -2554,7 +2556,7 @@ int DescriptorProto_ExtensionRange::ByteSize() const { |
- } |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -2760,7 +2762,7 @@ bool DescriptorProto_ReservedRange::MergePartialFromCodedStream( |
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
- goto success; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -2789,7 +2791,7 @@ void DescriptorProto_ReservedRange::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto.ReservedRange) |
-@@ -2809,7 +2811,7 @@ void DescriptorProto_ReservedRange::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto.ReservedRange) |
-@@ -2837,7 +2839,7 @@ int DescriptorProto_ReservedRange::ByteSize() const { |
- } |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -3191,7 +3193,7 @@ bool DescriptorProto::MergePartialFromCodedStream( |
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
- goto success; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -3278,7 +3280,7 @@ void DescriptorProto::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto) |
-@@ -3365,7 +3367,7 @@ void DescriptorProto::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto) |
-@@ -3456,7 +3458,7 @@ int DescriptorProto::ByteSize() const { |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -4380,7 +4382,7 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( |
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
- goto success; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -4467,7 +4469,7 @@ void FieldDescriptorProto::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.FieldDescriptorProto) |
-@@ -4550,7 +4552,7 @@ void FieldDescriptorProto::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldDescriptorProto) |
-@@ -4625,7 +4627,7 @@ int FieldDescriptorProto::ByteSize() const { |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -5202,7 +5204,7 @@ bool OneofDescriptorProto::MergePartialFromCodedStream( |
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
- goto success; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -5231,7 +5233,7 @@ void OneofDescriptorProto::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.OneofDescriptorProto) |
-@@ -5252,7 +5254,7 @@ void OneofDescriptorProto::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.OneofDescriptorProto) |
-@@ -5271,7 +5273,7 @@ int OneofDescriptorProto::ByteSize() const { |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -5549,7 +5551,7 @@ bool EnumDescriptorProto::MergePartialFromCodedStream( |
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
- goto success; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -5590,7 +5592,7 @@ void EnumDescriptorProto::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.EnumDescriptorProto) |
-@@ -5625,7 +5627,7 @@ void EnumDescriptorProto::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumDescriptorProto) |
-@@ -5661,7 +5663,7 @@ int EnumDescriptorProto::ByteSize() const { |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -6021,7 +6023,7 @@ bool EnumValueDescriptorProto::MergePartialFromCodedStream( |
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
- goto success; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -6061,7 +6063,7 @@ void EnumValueDescriptorProto::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValueDescriptorProto) |
-@@ -6094,7 +6096,7 @@ void EnumValueDescriptorProto::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValueDescriptorProto) |
-@@ -6129,7 +6131,7 @@ int EnumValueDescriptorProto::ByteSize() const { |
- } |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -6485,7 +6487,7 @@ bool ServiceDescriptorProto::MergePartialFromCodedStream( |
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
- goto success; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -6526,7 +6528,7 @@ void ServiceDescriptorProto::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.ServiceDescriptorProto) |
-@@ -6561,7 +6563,7 @@ void ServiceDescriptorProto::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ServiceDescriptorProto) |
-@@ -6597,7 +6599,7 @@ int ServiceDescriptorProto::ByteSize() const { |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -7032,7 +7034,7 @@ bool MethodDescriptorProto::MergePartialFromCodedStream( |
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
- goto success; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -7097,7 +7099,7 @@ void MethodDescriptorProto::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.MethodDescriptorProto) |
-@@ -7157,7 +7159,7 @@ void MethodDescriptorProto::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MethodDescriptorProto) |
-@@ -7209,7 +7211,7 @@ int MethodDescriptorProto::ByteSize() const { |
- } |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -7588,6 +7590,7 @@ const int FileOptions::OptimizeMode_ARRAYSIZE; |
- const int FileOptions::kJavaPackageFieldNumber; |
- const int FileOptions::kJavaOuterClassnameFieldNumber; |
- const int FileOptions::kJavaMultipleFilesFieldNumber; |
-+const int FileOptions::kRetainUnknownFieldsFieldNumber; |
- const int FileOptions::kJavaGenerateEqualsAndHashFieldNumber; |
- const int FileOptions::kJavaStringCheckUtf8FieldNumber; |
- const int FileOptions::kOptimizeForFieldNumber; |
-@@ -7626,6 +7629,7 @@ void FileOptions::SharedCtor() { |
- java_package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
- java_outer_classname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
- java_multiple_files_ = false; |
-+ retain_unknown_fields_ = false; |
- java_generate_equals_and_hash_ = false; |
- java_string_check_utf8_ = false; |
- optimize_for_ = 1; |
-@@ -7692,7 +7696,7 @@ void FileOptions::Clear() { |
- } while (0) |
- |
- if (_has_bits_[0 / 32] & 255u) { |
-- ZR_(java_multiple_files_, cc_generic_services_); |
-+ ZR_(java_multiple_files_, java_string_check_utf8_); |
- if (has_java_package()) { |
- java_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
- } |
-@@ -7704,8 +7708,8 @@ void FileOptions::Clear() { |
- go_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
- } |
- } |
-- if (_has_bits_[8 / 32] & 32512u) { |
-- ZR_(java_generic_services_, javanano_use_deprecated_package_); |
-+ if (_has_bits_[8 / 32] & 65280u) { |
-+ ZR_(cc_generic_services_, javanano_use_deprecated_package_); |
- if (has_objc_class_prefix()) { |
- objc_class_prefix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
- } |
-@@ -7815,6 +7819,21 @@ bool FileOptions::MergePartialFromCodedStream( |
- } else { |
- goto handle_unusual; |
- } |
-+ if (input->ExpectTag(96)) goto parse_retain_unknown_fields; |
-+ break; |
-+ } |
-+ |
-+ // optional bool retain_unknown_fields = 12 [default = false]; |
-+ case 12: { |
-+ if (tag == 96) { |
-+ parse_retain_unknown_fields: |
-+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
-+ bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
-+ input, &retain_unknown_fields_))); |
-+ set_has_retain_unknown_fields(); |
-+ } else { |
-+ goto handle_unusual; |
-+ } |
- if (input->ExpectTag(128)) goto parse_cc_generic_services; |
- break; |
- } |
-@@ -8002,7 +8021,7 @@ bool FileOptions::MergePartialFromCodedStream( |
- mutable_unknown_fields())); |
- continue; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -8061,6 +8080,11 @@ void FileOptions::SerializeWithCachedSizes( |
- 11, this->go_package(), output); |
- } |
- |
-+ // optional bool retain_unknown_fields = 12 [default = false]; |
-+ if (has_retain_unknown_fields()) { |
-+ ::google::protobuf::internal::WireFormatLite::WriteBool(12, this->retain_unknown_fields(), output); |
-+ } |
-+ |
- // optional bool cc_generic_services = 16 [default = false]; |
- if (has_cc_generic_services()) { |
- ::google::protobuf::internal::WireFormatLite::WriteBool(16, this->cc_generic_services(), output); |
-@@ -8132,7 +8156,7 @@ void FileOptions::SerializeWithCachedSizes( |
- 1000, 536870912, output); |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.FileOptions) |
-@@ -8185,6 +8209,11 @@ void FileOptions::SerializeWithCachedSizes( |
- 11, this->go_package(), target); |
- } |
- |
-+ // optional bool retain_unknown_fields = 12 [default = false]; |
-+ if (has_retain_unknown_fields()) { |
-+ target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(12, this->retain_unknown_fields(), target); |
-+ } |
-+ |
- // optional bool cc_generic_services = 16 [default = false]; |
- if (has_cc_generic_services()) { |
- target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(16, this->cc_generic_services(), target); |
-@@ -8259,7 +8288,7 @@ void FileOptions::SerializeWithCachedSizes( |
- 1000, 536870912, target); |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileOptions) |
-@@ -8289,6 +8318,11 @@ int FileOptions::ByteSize() const { |
- total_size += 1 + 1; |
- } |
- |
-+ // optional bool retain_unknown_fields = 12 [default = false]; |
-+ if (has_retain_unknown_fields()) { |
-+ total_size += 1 + 1; |
-+ } |
-+ |
- // optional bool java_generate_equals_and_hash = 20 [default = false]; |
- if (has_java_generate_equals_and_hash()) { |
- total_size += 2 + 1; |
-@@ -8312,13 +8346,13 @@ int FileOptions::ByteSize() const { |
- this->go_package()); |
- } |
- |
-+ } |
-+ if (_has_bits_[8 / 32] & 65280u) { |
- // optional bool cc_generic_services = 16 [default = false]; |
- if (has_cc_generic_services()) { |
- total_size += 2 + 1; |
- } |
- |
-- } |
-- if (_has_bits_[8 / 32] & 32512u) { |
- // optional bool java_generic_services = 17 [default = false]; |
- if (has_java_generic_services()) { |
- total_size += 2 + 1; |
-@@ -8371,7 +8405,7 @@ int FileOptions::ByteSize() const { |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -8407,6 +8441,9 @@ void FileOptions::MergeFrom(const FileOptions& from) { |
- if (from.has_java_multiple_files()) { |
- set_java_multiple_files(from.java_multiple_files()); |
- } |
-+ if (from.has_retain_unknown_fields()) { |
-+ set_retain_unknown_fields(from.retain_unknown_fields()); |
-+ } |
- if (from.has_java_generate_equals_and_hash()) { |
- set_java_generate_equals_and_hash(from.java_generate_equals_and_hash()); |
- } |
-@@ -8420,11 +8457,11 @@ void FileOptions::MergeFrom(const FileOptions& from) { |
- set_has_go_package(); |
- go_package_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.go_package_); |
- } |
-+ } |
-+ if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) { |
- if (from.has_cc_generic_services()) { |
- set_cc_generic_services(from.cc_generic_services()); |
- } |
-- } |
-- if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) { |
- if (from.has_java_generic_services()) { |
- set_java_generic_services(from.java_generic_services()); |
- } |
-@@ -8482,6 +8519,7 @@ void FileOptions::InternalSwap(FileOptions* other) { |
- java_package_.Swap(&other->java_package_); |
- java_outer_classname_.Swap(&other->java_outer_classname_); |
- std::swap(java_multiple_files_, other->java_multiple_files_); |
-+ std::swap(retain_unknown_fields_, other->retain_unknown_fields_); |
- std::swap(java_generate_equals_and_hash_, other->java_generate_equals_and_hash_); |
- std::swap(java_string_check_utf8_, other->java_string_check_utf8_); |
- std::swap(optimize_for_, other->optimize_for_); |
-@@ -8642,15 +8680,39 @@ void FileOptions::clear_java_multiple_files() { |
- // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_multiple_files) |
- } |
- |
-+// optional bool retain_unknown_fields = 12 [default = false]; |
-+bool FileOptions::has_retain_unknown_fields() const { |
-+ return (_has_bits_[0] & 0x00000008u) != 0; |
-+} |
-+void FileOptions::set_has_retain_unknown_fields() { |
-+ _has_bits_[0] |= 0x00000008u; |
-+} |
-+void FileOptions::clear_has_retain_unknown_fields() { |
-+ _has_bits_[0] &= ~0x00000008u; |
-+} |
-+void FileOptions::clear_retain_unknown_fields() { |
-+ retain_unknown_fields_ = false; |
-+ clear_has_retain_unknown_fields(); |
-+} |
-+ bool FileOptions::retain_unknown_fields() const { |
-+ // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.retain_unknown_fields) |
-+ return retain_unknown_fields_; |
-+} |
-+ void FileOptions::set_retain_unknown_fields(bool value) { |
-+ set_has_retain_unknown_fields(); |
-+ retain_unknown_fields_ = value; |
-+ // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.retain_unknown_fields) |
-+} |
-+ |
- // optional bool java_generate_equals_and_hash = 20 [default = false]; |
- bool FileOptions::has_java_generate_equals_and_hash() const { |
-- return (_has_bits_[0] & 0x00000008u) != 0; |
-+ return (_has_bits_[0] & 0x00000010u) != 0; |
- } |
- void FileOptions::set_has_java_generate_equals_and_hash() { |
-- _has_bits_[0] |= 0x00000008u; |
-+ _has_bits_[0] |= 0x00000010u; |
- } |
- void FileOptions::clear_has_java_generate_equals_and_hash() { |
-- _has_bits_[0] &= ~0x00000008u; |
-+ _has_bits_[0] &= ~0x00000010u; |
- } |
- void FileOptions::clear_java_generate_equals_and_hash() { |
- java_generate_equals_and_hash_ = false; |
-@@ -8668,13 +8730,13 @@ void FileOptions::clear_java_generate_equals_and_hash() { |
- |
- // optional bool java_string_check_utf8 = 27 [default = false]; |
- bool FileOptions::has_java_string_check_utf8() const { |
-- return (_has_bits_[0] & 0x00000010u) != 0; |
-+ return (_has_bits_[0] & 0x00000020u) != 0; |
- } |
- void FileOptions::set_has_java_string_check_utf8() { |
-- _has_bits_[0] |= 0x00000010u; |
-+ _has_bits_[0] |= 0x00000020u; |
- } |
- void FileOptions::clear_has_java_string_check_utf8() { |
-- _has_bits_[0] &= ~0x00000010u; |
-+ _has_bits_[0] &= ~0x00000020u; |
- } |
- void FileOptions::clear_java_string_check_utf8() { |
- java_string_check_utf8_ = false; |
-@@ -8692,13 +8754,13 @@ void FileOptions::clear_java_string_check_utf8() { |
- |
- // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; |
- bool FileOptions::has_optimize_for() const { |
-- return (_has_bits_[0] & 0x00000020u) != 0; |
-+ return (_has_bits_[0] & 0x00000040u) != 0; |
- } |
- void FileOptions::set_has_optimize_for() { |
-- _has_bits_[0] |= 0x00000020u; |
-+ _has_bits_[0] |= 0x00000040u; |
- } |
- void FileOptions::clear_has_optimize_for() { |
-- _has_bits_[0] &= ~0x00000020u; |
-+ _has_bits_[0] &= ~0x00000040u; |
- } |
- void FileOptions::clear_optimize_for() { |
- optimize_for_ = 1; |
-@@ -8717,13 +8779,13 @@ void FileOptions::clear_optimize_for() { |
- |
- // optional string go_package = 11; |
- bool FileOptions::has_go_package() const { |
-- return (_has_bits_[0] & 0x00000040u) != 0; |
-+ return (_has_bits_[0] & 0x00000080u) != 0; |
- } |
- void FileOptions::set_has_go_package() { |
-- _has_bits_[0] |= 0x00000040u; |
-+ _has_bits_[0] |= 0x00000080u; |
- } |
- void FileOptions::clear_has_go_package() { |
-- _has_bits_[0] &= ~0x00000040u; |
-+ _has_bits_[0] &= ~0x00000080u; |
- } |
- void FileOptions::clear_go_package() { |
- go_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
-@@ -8770,13 +8832,13 @@ void FileOptions::clear_go_package() { |
- |
- // optional bool cc_generic_services = 16 [default = false]; |
- bool FileOptions::has_cc_generic_services() const { |
-- return (_has_bits_[0] & 0x00000080u) != 0; |
-+ return (_has_bits_[0] & 0x00000100u) != 0; |
- } |
- void FileOptions::set_has_cc_generic_services() { |
-- _has_bits_[0] |= 0x00000080u; |
-+ _has_bits_[0] |= 0x00000100u; |
- } |
- void FileOptions::clear_has_cc_generic_services() { |
-- _has_bits_[0] &= ~0x00000080u; |
-+ _has_bits_[0] &= ~0x00000100u; |
- } |
- void FileOptions::clear_cc_generic_services() { |
- cc_generic_services_ = false; |
-@@ -8794,13 +8856,13 @@ void FileOptions::clear_cc_generic_services() { |
- |
- // optional bool java_generic_services = 17 [default = false]; |
- bool FileOptions::has_java_generic_services() const { |
-- return (_has_bits_[0] & 0x00000100u) != 0; |
-+ return (_has_bits_[0] & 0x00000200u) != 0; |
- } |
- void FileOptions::set_has_java_generic_services() { |
-- _has_bits_[0] |= 0x00000100u; |
-+ _has_bits_[0] |= 0x00000200u; |
- } |
- void FileOptions::clear_has_java_generic_services() { |
-- _has_bits_[0] &= ~0x00000100u; |
-+ _has_bits_[0] &= ~0x00000200u; |
- } |
- void FileOptions::clear_java_generic_services() { |
- java_generic_services_ = false; |
-@@ -8818,13 +8880,13 @@ void FileOptions::clear_java_generic_services() { |
- |
- // optional bool py_generic_services = 18 [default = false]; |
- bool FileOptions::has_py_generic_services() const { |
-- return (_has_bits_[0] & 0x00000200u) != 0; |
-+ return (_has_bits_[0] & 0x00000400u) != 0; |
- } |
- void FileOptions::set_has_py_generic_services() { |
-- _has_bits_[0] |= 0x00000200u; |
-+ _has_bits_[0] |= 0x00000400u; |
- } |
- void FileOptions::clear_has_py_generic_services() { |
-- _has_bits_[0] &= ~0x00000200u; |
-+ _has_bits_[0] &= ~0x00000400u; |
- } |
- void FileOptions::clear_py_generic_services() { |
- py_generic_services_ = false; |
-@@ -8842,13 +8904,13 @@ void FileOptions::clear_py_generic_services() { |
- |
- // optional bool deprecated = 23 [default = false]; |
- bool FileOptions::has_deprecated() const { |
-- return (_has_bits_[0] & 0x00000400u) != 0; |
-+ return (_has_bits_[0] & 0x00000800u) != 0; |
- } |
- void FileOptions::set_has_deprecated() { |
-- _has_bits_[0] |= 0x00000400u; |
-+ _has_bits_[0] |= 0x00000800u; |
- } |
- void FileOptions::clear_has_deprecated() { |
-- _has_bits_[0] &= ~0x00000400u; |
-+ _has_bits_[0] &= ~0x00000800u; |
- } |
- void FileOptions::clear_deprecated() { |
- deprecated_ = false; |
-@@ -8866,13 +8928,13 @@ void FileOptions::clear_deprecated() { |
- |
- // optional bool cc_enable_arenas = 31 [default = false]; |
- bool FileOptions::has_cc_enable_arenas() const { |
-- return (_has_bits_[0] & 0x00000800u) != 0; |
-+ return (_has_bits_[0] & 0x00001000u) != 0; |
- } |
- void FileOptions::set_has_cc_enable_arenas() { |
-- _has_bits_[0] |= 0x00000800u; |
-+ _has_bits_[0] |= 0x00001000u; |
- } |
- void FileOptions::clear_has_cc_enable_arenas() { |
-- _has_bits_[0] &= ~0x00000800u; |
-+ _has_bits_[0] &= ~0x00001000u; |
- } |
- void FileOptions::clear_cc_enable_arenas() { |
- cc_enable_arenas_ = false; |
-@@ -8890,13 +8952,13 @@ void FileOptions::clear_cc_enable_arenas() { |
- |
- // optional string objc_class_prefix = 36; |
- bool FileOptions::has_objc_class_prefix() const { |
-- return (_has_bits_[0] & 0x00001000u) != 0; |
-+ return (_has_bits_[0] & 0x00002000u) != 0; |
- } |
- void FileOptions::set_has_objc_class_prefix() { |
-- _has_bits_[0] |= 0x00001000u; |
-+ _has_bits_[0] |= 0x00002000u; |
- } |
- void FileOptions::clear_has_objc_class_prefix() { |
-- _has_bits_[0] &= ~0x00001000u; |
-+ _has_bits_[0] &= ~0x00002000u; |
- } |
- void FileOptions::clear_objc_class_prefix() { |
- objc_class_prefix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
-@@ -8943,13 +9005,13 @@ void FileOptions::clear_objc_class_prefix() { |
- |
- // optional string csharp_namespace = 37; |
- bool FileOptions::has_csharp_namespace() const { |
-- return (_has_bits_[0] & 0x00002000u) != 0; |
-+ return (_has_bits_[0] & 0x00004000u) != 0; |
- } |
- void FileOptions::set_has_csharp_namespace() { |
-- _has_bits_[0] |= 0x00002000u; |
-+ _has_bits_[0] |= 0x00004000u; |
- } |
- void FileOptions::clear_has_csharp_namespace() { |
-- _has_bits_[0] &= ~0x00002000u; |
-+ _has_bits_[0] &= ~0x00004000u; |
- } |
- void FileOptions::clear_csharp_namespace() { |
- csharp_namespace_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
-@@ -8996,13 +9058,13 @@ void FileOptions::clear_csharp_namespace() { |
- |
- // optional bool javanano_use_deprecated_package = 38; |
- bool FileOptions::has_javanano_use_deprecated_package() const { |
-- return (_has_bits_[0] & 0x00004000u) != 0; |
-+ return (_has_bits_[0] & 0x00008000u) != 0; |
- } |
- void FileOptions::set_has_javanano_use_deprecated_package() { |
-- _has_bits_[0] |= 0x00004000u; |
-+ _has_bits_[0] |= 0x00008000u; |
- } |
- void FileOptions::clear_has_javanano_use_deprecated_package() { |
-- _has_bits_[0] &= ~0x00004000u; |
-+ _has_bits_[0] &= ~0x00008000u; |
- } |
- void FileOptions::clear_javanano_use_deprecated_package() { |
- javanano_use_deprecated_package_ = false; |
-@@ -9241,7 +9303,7 @@ bool MessageOptions::MergePartialFromCodedStream( |
- mutable_unknown_fields())); |
- continue; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -9290,7 +9352,7 @@ void MessageOptions::SerializeWithCachedSizes( |
- 1000, 536870912, output); |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.MessageOptions) |
-@@ -9331,7 +9393,7 @@ void MessageOptions::SerializeWithCachedSizes( |
- 1000, 536870912, target); |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MessageOptions) |
-@@ -9375,7 +9437,7 @@ int MessageOptions::ByteSize() const { |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -9877,7 +9939,7 @@ bool FieldOptions::MergePartialFromCodedStream( |
- mutable_unknown_fields())); |
- continue; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -9938,7 +10000,7 @@ void FieldOptions::SerializeWithCachedSizes( |
- 1000, 536870912, output); |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.FieldOptions) |
-@@ -9991,7 +10053,7 @@ void FieldOptions::SerializeWithCachedSizes( |
- 1000, 536870912, target); |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldOptions) |
-@@ -10047,7 +10109,7 @@ int FieldOptions::ByteSize() const { |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -10480,7 +10542,7 @@ bool EnumOptions::MergePartialFromCodedStream( |
- mutable_unknown_fields())); |
- continue; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -10519,7 +10581,7 @@ void EnumOptions::SerializeWithCachedSizes( |
- 1000, 536870912, output); |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.EnumOptions) |
-@@ -10550,7 +10612,7 @@ void EnumOptions::SerializeWithCachedSizes( |
- 1000, 536870912, target); |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumOptions) |
-@@ -10584,7 +10646,7 @@ int EnumOptions::ByteSize() const { |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -10874,7 +10936,7 @@ bool EnumValueOptions::MergePartialFromCodedStream( |
- mutable_unknown_fields())); |
- continue; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -10908,7 +10970,7 @@ void EnumValueOptions::SerializeWithCachedSizes( |
- 1000, 536870912, output); |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValueOptions) |
-@@ -10934,7 +10996,7 @@ void EnumValueOptions::SerializeWithCachedSizes( |
- 1000, 536870912, target); |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValueOptions) |
-@@ -10961,7 +11023,7 @@ int EnumValueOptions::ByteSize() const { |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -11223,7 +11285,7 @@ bool ServiceOptions::MergePartialFromCodedStream( |
- mutable_unknown_fields())); |
- continue; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -11257,7 +11319,7 @@ void ServiceOptions::SerializeWithCachedSizes( |
- 1000, 536870912, output); |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.ServiceOptions) |
-@@ -11283,7 +11345,7 @@ void ServiceOptions::SerializeWithCachedSizes( |
- 1000, 536870912, target); |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ServiceOptions) |
-@@ -11310,7 +11372,7 @@ int ServiceOptions::ByteSize() const { |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -11572,7 +11634,7 @@ bool MethodOptions::MergePartialFromCodedStream( |
- mutable_unknown_fields())); |
- continue; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -11606,7 +11668,7 @@ void MethodOptions::SerializeWithCachedSizes( |
- 1000, 536870912, output); |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.MethodOptions) |
-@@ -11632,7 +11694,7 @@ void MethodOptions::SerializeWithCachedSizes( |
- 1000, 536870912, target); |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MethodOptions) |
-@@ -11659,7 +11721,7 @@ int MethodOptions::ByteSize() const { |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -11922,7 +11984,7 @@ bool UninterpretedOption_NamePart::MergePartialFromCodedStream( |
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
- goto success; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -11956,7 +12018,7 @@ void UninterpretedOption_NamePart::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.UninterpretedOption.NamePart) |
-@@ -11982,7 +12044,7 @@ void UninterpretedOption_NamePart::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UninterpretedOption.NamePart) |
-@@ -12023,7 +12085,7 @@ int UninterpretedOption_NamePart::ByteSize() const { |
- } |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -12335,7 +12397,7 @@ bool UninterpretedOption::MergePartialFromCodedStream( |
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
- goto success; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -12401,7 +12463,7 @@ void UninterpretedOption::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.UninterpretedOption) |
-@@ -12462,7 +12524,7 @@ void UninterpretedOption::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UninterpretedOption) |
-@@ -12524,7 +12586,7 @@ int UninterpretedOption::ByteSize() const { |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -13161,7 +13223,7 @@ bool SourceCodeInfo_Location::MergePartialFromCodedStream( |
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
- goto success; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -13230,7 +13292,7 @@ void SourceCodeInfo_Location::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.SourceCodeInfo.Location) |
-@@ -13300,7 +13362,7 @@ void SourceCodeInfo_Location::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceCodeInfo.Location) |
-@@ -13369,7 +13431,7 @@ int SourceCodeInfo_Location::ByteSize() const { |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-@@ -13555,7 +13617,7 @@ bool SourceCodeInfo::MergePartialFromCodedStream( |
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
- goto success; |
- } |
-- DO_(::google::protobuf::internal::WireFormat::SkipField( |
-+ DO_(::google::protobuf::internal::WireFormatLite::SkipField( |
- input, tag, mutable_unknown_fields())); |
- break; |
- } |
-@@ -13580,7 +13642,7 @@ void SourceCodeInfo::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
-+ ::google::protobuf::internal::WireFormatLite::SerializeUnknownFields( |
- unknown_fields(), output); |
- } |
- // @@protoc_insertion_point(serialize_end:google.protobuf.SourceCodeInfo) |
-@@ -13597,7 +13659,7 @@ void SourceCodeInfo::SerializeWithCachedSizes( |
- } |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
-- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
-+ target = ::google::protobuf::internal::WireFormatLite::SerializeUnknownFieldsToArray( |
- unknown_fields(), target); |
- } |
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceCodeInfo) |
-@@ -13617,7 +13679,7 @@ int SourceCodeInfo::ByteSize() const { |
- |
- if (_internal_metadata_.have_unknown_fields()) { |
- total_size += |
-- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
-+ ::google::protobuf::internal::WireFormatLite::ComputeUnknownFieldsSize( |
- unknown_fields()); |
- } |
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
-diff --git a/third_party/protobuf/src/google/protobuf/descriptor.pb.h b/third_party/protobuf/src/google/protobuf/descriptor.pb.h |
-index 2aa076a..bbf9cbc 100644 |
---- a/third_party/protobuf/src/google/protobuf/descriptor.pb.h |
-+++ b/third_party/protobuf/src/google/protobuf/descriptor.pb.h |
-@@ -1908,6 +1908,13 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message { |
- bool java_multiple_files() const; |
- void set_java_multiple_files(bool value); |
- |
-+ // optional bool retain_unknown_fields = 12 [default = false]; |
-+ bool has_retain_unknown_fields() const; |
-+ void clear_retain_unknown_fields(); |
-+ static const int kRetainUnknownFieldsFieldNumber = 12; |
-+ bool retain_unknown_fields() const; |
-+ void set_retain_unknown_fields(bool value); |
-+ |
- // optional bool java_generate_equals_and_hash = 20 [default = false]; |
- bool has_java_generate_equals_and_hash() const; |
- void clear_java_generate_equals_and_hash(); |
-@@ -2028,6 +2035,8 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message { |
- inline void clear_has_java_outer_classname(); |
- inline void set_has_java_multiple_files(); |
- inline void clear_has_java_multiple_files(); |
-+ inline void set_has_retain_unknown_fields(); |
-+ inline void clear_has_retain_unknown_fields(); |
- inline void set_has_java_generate_equals_and_hash(); |
- inline void clear_has_java_generate_equals_and_hash(); |
- inline void set_has_java_string_check_utf8(); |
-@@ -2061,11 +2070,12 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message { |
- ::google::protobuf::internal::ArenaStringPtr java_package_; |
- ::google::protobuf::internal::ArenaStringPtr java_outer_classname_; |
- bool java_multiple_files_; |
-+ bool retain_unknown_fields_; |
- bool java_generate_equals_and_hash_; |
- bool java_string_check_utf8_; |
-- bool cc_generic_services_; |
- int optimize_for_; |
- ::google::protobuf::internal::ArenaStringPtr go_package_; |
-+ bool cc_generic_services_; |
- bool java_generic_services_; |
- bool py_generic_services_; |
- bool deprecated_; |
-@@ -5550,15 +5560,39 @@ inline void FileOptions::set_java_multiple_files(bool value) { |
- // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_multiple_files) |
- } |
- |
-+// optional bool retain_unknown_fields = 12 [default = false]; |
-+inline bool FileOptions::has_retain_unknown_fields() const { |
-+ return (_has_bits_[0] & 0x00000008u) != 0; |
-+} |
-+inline void FileOptions::set_has_retain_unknown_fields() { |
-+ _has_bits_[0] |= 0x00000008u; |
-+} |
-+inline void FileOptions::clear_has_retain_unknown_fields() { |
-+ _has_bits_[0] &= ~0x00000008u; |
-+} |
-+inline void FileOptions::clear_retain_unknown_fields() { |
-+ retain_unknown_fields_ = false; |
-+ clear_has_retain_unknown_fields(); |
-+} |
-+inline bool FileOptions::retain_unknown_fields() const { |
-+ // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.retain_unknown_fields) |
-+ return retain_unknown_fields_; |
-+} |
-+inline void FileOptions::set_retain_unknown_fields(bool value) { |
-+ set_has_retain_unknown_fields(); |
-+ retain_unknown_fields_ = value; |
-+ // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.retain_unknown_fields) |
-+} |
-+ |
- // optional bool java_generate_equals_and_hash = 20 [default = false]; |
- inline bool FileOptions::has_java_generate_equals_and_hash() const { |
-- return (_has_bits_[0] & 0x00000008u) != 0; |
-+ return (_has_bits_[0] & 0x00000010u) != 0; |
- } |
- inline void FileOptions::set_has_java_generate_equals_and_hash() { |
-- _has_bits_[0] |= 0x00000008u; |
-+ _has_bits_[0] |= 0x00000010u; |
- } |
- inline void FileOptions::clear_has_java_generate_equals_and_hash() { |
-- _has_bits_[0] &= ~0x00000008u; |
-+ _has_bits_[0] &= ~0x00000010u; |
- } |
- inline void FileOptions::clear_java_generate_equals_and_hash() { |
- java_generate_equals_and_hash_ = false; |
-@@ -5576,13 +5610,13 @@ inline void FileOptions::set_java_generate_equals_and_hash(bool value) { |
- |
- // optional bool java_string_check_utf8 = 27 [default = false]; |
- inline bool FileOptions::has_java_string_check_utf8() const { |
-- return (_has_bits_[0] & 0x00000010u) != 0; |
-+ return (_has_bits_[0] & 0x00000020u) != 0; |
- } |
- inline void FileOptions::set_has_java_string_check_utf8() { |
-- _has_bits_[0] |= 0x00000010u; |
-+ _has_bits_[0] |= 0x00000020u; |
- } |
- inline void FileOptions::clear_has_java_string_check_utf8() { |
-- _has_bits_[0] &= ~0x00000010u; |
-+ _has_bits_[0] &= ~0x00000020u; |
- } |
- inline void FileOptions::clear_java_string_check_utf8() { |
- java_string_check_utf8_ = false; |
-@@ -5600,13 +5634,13 @@ inline void FileOptions::set_java_string_check_utf8(bool value) { |
- |
- // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; |
- inline bool FileOptions::has_optimize_for() const { |
-- return (_has_bits_[0] & 0x00000020u) != 0; |
-+ return (_has_bits_[0] & 0x00000040u) != 0; |
- } |
- inline void FileOptions::set_has_optimize_for() { |
-- _has_bits_[0] |= 0x00000020u; |
-+ _has_bits_[0] |= 0x00000040u; |
- } |
- inline void FileOptions::clear_has_optimize_for() { |
-- _has_bits_[0] &= ~0x00000020u; |
-+ _has_bits_[0] &= ~0x00000040u; |
- } |
- inline void FileOptions::clear_optimize_for() { |
- optimize_for_ = 1; |
-@@ -5625,13 +5659,13 @@ inline void FileOptions::set_optimize_for(::google::protobuf::FileOptions_Optimi |
- |
- // optional string go_package = 11; |
- inline bool FileOptions::has_go_package() const { |
-- return (_has_bits_[0] & 0x00000040u) != 0; |
-+ return (_has_bits_[0] & 0x00000080u) != 0; |
- } |
- inline void FileOptions::set_has_go_package() { |
-- _has_bits_[0] |= 0x00000040u; |
-+ _has_bits_[0] |= 0x00000080u; |
- } |
- inline void FileOptions::clear_has_go_package() { |
-- _has_bits_[0] &= ~0x00000040u; |
-+ _has_bits_[0] &= ~0x00000080u; |
- } |
- inline void FileOptions::clear_go_package() { |
- go_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
-@@ -5678,13 +5712,13 @@ inline void FileOptions::set_allocated_go_package(::std::string* go_package) { |
- |
- // optional bool cc_generic_services = 16 [default = false]; |
- inline bool FileOptions::has_cc_generic_services() const { |
-- return (_has_bits_[0] & 0x00000080u) != 0; |
-+ return (_has_bits_[0] & 0x00000100u) != 0; |
- } |
- inline void FileOptions::set_has_cc_generic_services() { |
-- _has_bits_[0] |= 0x00000080u; |
-+ _has_bits_[0] |= 0x00000100u; |
- } |
- inline void FileOptions::clear_has_cc_generic_services() { |
-- _has_bits_[0] &= ~0x00000080u; |
-+ _has_bits_[0] &= ~0x00000100u; |
- } |
- inline void FileOptions::clear_cc_generic_services() { |
- cc_generic_services_ = false; |
-@@ -5702,13 +5736,13 @@ inline void FileOptions::set_cc_generic_services(bool value) { |
- |
- // optional bool java_generic_services = 17 [default = false]; |
- inline bool FileOptions::has_java_generic_services() const { |
-- return (_has_bits_[0] & 0x00000100u) != 0; |
-+ return (_has_bits_[0] & 0x00000200u) != 0; |
- } |
- inline void FileOptions::set_has_java_generic_services() { |
-- _has_bits_[0] |= 0x00000100u; |
-+ _has_bits_[0] |= 0x00000200u; |
- } |
- inline void FileOptions::clear_has_java_generic_services() { |
-- _has_bits_[0] &= ~0x00000100u; |
-+ _has_bits_[0] &= ~0x00000200u; |
- } |
- inline void FileOptions::clear_java_generic_services() { |
- java_generic_services_ = false; |
-@@ -5726,13 +5760,13 @@ inline void FileOptions::set_java_generic_services(bool value) { |
- |
- // optional bool py_generic_services = 18 [default = false]; |
- inline bool FileOptions::has_py_generic_services() const { |
-- return (_has_bits_[0] & 0x00000200u) != 0; |
-+ return (_has_bits_[0] & 0x00000400u) != 0; |
- } |
- inline void FileOptions::set_has_py_generic_services() { |
-- _has_bits_[0] |= 0x00000200u; |
-+ _has_bits_[0] |= 0x00000400u; |
- } |
- inline void FileOptions::clear_has_py_generic_services() { |
-- _has_bits_[0] &= ~0x00000200u; |
-+ _has_bits_[0] &= ~0x00000400u; |
- } |
- inline void FileOptions::clear_py_generic_services() { |
- py_generic_services_ = false; |
-@@ -5750,13 +5784,13 @@ inline void FileOptions::set_py_generic_services(bool value) { |
- |
- // optional bool deprecated = 23 [default = false]; |
- inline bool FileOptions::has_deprecated() const { |
-- return (_has_bits_[0] & 0x00000400u) != 0; |
-+ return (_has_bits_[0] & 0x00000800u) != 0; |
- } |
- inline void FileOptions::set_has_deprecated() { |
-- _has_bits_[0] |= 0x00000400u; |
-+ _has_bits_[0] |= 0x00000800u; |
- } |
- inline void FileOptions::clear_has_deprecated() { |
-- _has_bits_[0] &= ~0x00000400u; |
-+ _has_bits_[0] &= ~0x00000800u; |
- } |
- inline void FileOptions::clear_deprecated() { |
- deprecated_ = false; |
-@@ -5774,13 +5808,13 @@ inline void FileOptions::set_deprecated(bool value) { |
- |
- // optional bool cc_enable_arenas = 31 [default = false]; |
- inline bool FileOptions::has_cc_enable_arenas() const { |
-- return (_has_bits_[0] & 0x00000800u) != 0; |
-+ return (_has_bits_[0] & 0x00001000u) != 0; |
- } |
- inline void FileOptions::set_has_cc_enable_arenas() { |
-- _has_bits_[0] |= 0x00000800u; |
-+ _has_bits_[0] |= 0x00001000u; |
- } |
- inline void FileOptions::clear_has_cc_enable_arenas() { |
-- _has_bits_[0] &= ~0x00000800u; |
-+ _has_bits_[0] &= ~0x00001000u; |
- } |
- inline void FileOptions::clear_cc_enable_arenas() { |
- cc_enable_arenas_ = false; |
-@@ -5798,13 +5832,13 @@ inline void FileOptions::set_cc_enable_arenas(bool value) { |
- |
- // optional string objc_class_prefix = 36; |
- inline bool FileOptions::has_objc_class_prefix() const { |
-- return (_has_bits_[0] & 0x00001000u) != 0; |
-+ return (_has_bits_[0] & 0x00002000u) != 0; |
- } |
- inline void FileOptions::set_has_objc_class_prefix() { |
-- _has_bits_[0] |= 0x00001000u; |
-+ _has_bits_[0] |= 0x00002000u; |
- } |
- inline void FileOptions::clear_has_objc_class_prefix() { |
-- _has_bits_[0] &= ~0x00001000u; |
-+ _has_bits_[0] &= ~0x00002000u; |
- } |
- inline void FileOptions::clear_objc_class_prefix() { |
- objc_class_prefix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
-@@ -5851,13 +5885,13 @@ inline void FileOptions::set_allocated_objc_class_prefix(::std::string* objc_cla |
- |
- // optional string csharp_namespace = 37; |
- inline bool FileOptions::has_csharp_namespace() const { |
-- return (_has_bits_[0] & 0x00002000u) != 0; |
-+ return (_has_bits_[0] & 0x00004000u) != 0; |
- } |
- inline void FileOptions::set_has_csharp_namespace() { |
-- _has_bits_[0] |= 0x00002000u; |
-+ _has_bits_[0] |= 0x00004000u; |
- } |
- inline void FileOptions::clear_has_csharp_namespace() { |
-- _has_bits_[0] &= ~0x00002000u; |
-+ _has_bits_[0] &= ~0x00004000u; |
- } |
- inline void FileOptions::clear_csharp_namespace() { |
- csharp_namespace_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
-@@ -5904,13 +5938,13 @@ inline void FileOptions::set_allocated_csharp_namespace(::std::string* csharp_na |
- |
- // optional bool javanano_use_deprecated_package = 38; |
- inline bool FileOptions::has_javanano_use_deprecated_package() const { |
-- return (_has_bits_[0] & 0x00004000u) != 0; |
-+ return (_has_bits_[0] & 0x00008000u) != 0; |
- } |
- inline void FileOptions::set_has_javanano_use_deprecated_package() { |
-- _has_bits_[0] |= 0x00004000u; |
-+ _has_bits_[0] |= 0x00008000u; |
- } |
- inline void FileOptions::clear_has_javanano_use_deprecated_package() { |
-- _has_bits_[0] &= ~0x00004000u; |
-+ _has_bits_[0] &= ~0x00008000u; |
- } |
- inline void FileOptions::clear_javanano_use_deprecated_package() { |
- javanano_use_deprecated_package_ = false; |
-diff --git a/third_party/protobuf/src/google/protobuf/descriptor.proto b/third_party/protobuf/src/google/protobuf/descriptor.proto |
-index 9d3dd8f..4e38337 100644 |
---- a/third_party/protobuf/src/google/protobuf/descriptor.proto |
-+++ b/third_party/protobuf/src/google/protobuf/descriptor.proto |
-@@ -299,6 +299,12 @@ message FileOptions { |
- // top-level extensions defined in the file. |
- optional bool java_multiple_files = 10 [default=false]; |
- |
-+ // If set true, then code generators will store unknown fields so that |
-+ // reserializing a message will retain them. This is the default behaviour |
-+ // unless LITE_RUNTIME is specified. Therefore, this option only makes sense |
-+ // when LITE_RUNTIME is in use. |
-+ optional bool retain_unknown_fields = 12 [default=false]; |
-+ |
- // If set true, then the Java code generator will generate equals() and |
- // hashCode() methods for all messages defined in the .proto file. |
- // - In the full runtime, this is purely a speed optimization, as the |
-diff --git a/third_party/protobuf/src/google/protobuf/extension_set.cc b/third_party/protobuf/src/google/protobuf/extension_set.cc |
-index 649ae18..c315eca 100644 |
---- a/third_party/protobuf/src/google/protobuf/extension_set.cc |
-+++ b/third_party/protobuf/src/google/protobuf/extension_set.cc |
-@@ -38,6 +38,7 @@ |
- #include <google/protobuf/extension_set.h> |
- #include <google/protobuf/message_lite.h> |
- #include <google/protobuf/io/coded_stream.h> |
-+#include <google/protobuf/io/zero_copy_stream_impl_lite.h> |
- #include <google/protobuf/wire_format_lite_inl.h> |
- #include <google/protobuf/repeated_field.h> |
- #include <google/protobuf/stubs/map_util.h> |
-@@ -1318,7 +1319,14 @@ bool ExtensionSet::ParseFieldWithExtensionInfo( |
- |
- bool ExtensionSet::ParseField(uint32 tag, io::CodedInputStream* input, |
- const MessageLite* containing_type) { |
-- FieldSkipper skipper; |
-+ return ParseField(tag, input, containing_type, |
-+ static_cast<UnknownFieldSet*>(NULL)); |
-+} |
-+ |
-+bool ExtensionSet::ParseField(uint32 tag, io::CodedInputStream* input, |
-+ const MessageLite* containing_type, |
-+ UnknownFieldSet* unknown_fields) { |
-+ FieldSkipper skipper(unknown_fields); |
- GeneratedExtensionFinder finder(containing_type); |
- return ParseField(tag, input, &finder, &skipper); |
- } |
-@@ -1332,14 +1340,137 @@ bool ExtensionSet::ParseField(uint32 tag, io::CodedInputStream* input, |
- } |
- |
- // Defined in extension_set_heavy.cc. |
--// bool ExtensionSet::ParseField(uint32 tag, io::CodedInputStream* input, |
--// const MessageLite* containing_type, |
--// UnknownFieldSet* unknown_fields) |
-+// bool ExtensionSet::ParseFieldHeavy(uint32 tag, io::CodedInputStream* input, |
-+// const Message* containing_type, |
-+// UnknownFieldSet* unknown_fields) |
-+ |
-+bool ExtensionSet::ParseMessageSet(io::CodedInputStream* input, |
-+ ExtensionFinder* extension_finder, |
-+ FieldSkipper* field_skipper) { |
-+ while (true) { |
-+ const uint32 tag = input->ReadTag(); |
-+ switch (tag) { |
-+ case 0: |
-+ return true; |
-+ case WireFormatLite::kMessageSetItemStartTag: |
-+ if (!ParseMessageSetItem(input, extension_finder, field_skipper)) { |
-+ return false; |
-+ } |
-+ break; |
-+ default: |
-+ if (!ParseField(tag, input, extension_finder, field_skipper)) { |
-+ return false; |
-+ } |
-+ break; |
-+ } |
-+ } |
-+} |
-+ |
-+bool ExtensionSet::ParseMessageSet(io::CodedInputStream* input, |
-+ const MessageLite* containing_type) { |
-+ return ParseMessageSet(input, containing_type, |
-+ static_cast<UnknownFieldSet*>(NULL)); |
-+} |
-+ |
-+bool ExtensionSet::ParseMessageSet(io::CodedInputStream* input, |
-+ const MessageLite* containing_type, |
-+ UnknownFieldSet* unknown_fields) { |
-+ FieldSkipper skipper(unknown_fields); |
-+ GeneratedExtensionFinder finder(containing_type); |
-+ return ParseMessageSet(input, &finder, &skipper); |
-+} |
- |
- // Defined in extension_set_heavy.cc. |
--// bool ExtensionSet::ParseMessageSet(io::CodedInputStream* input, |
--// const MessageLite* containing_type, |
--// UnknownFieldSet* unknown_fields); |
-+// bool ExtensionSet::ParseMessageSetHeavy(io::CodedInputStream* input, |
-+// const Message* containing_type, |
-+// UnknownFieldSet* unknown_fields); |
-+ |
-+bool ExtensionSet::ParseFieldMaybeLazily( |
-+ int wire_type, int field_number, io::CodedInputStream* input, |
-+ ExtensionFinder* extension_finder, |
-+ FieldSkipper* field_skipper) { |
-+ return ParseField(WireFormatLite::MakeTag( |
-+ field_number, static_cast<WireFormatLite::WireType>(wire_type)), |
-+ input, extension_finder, field_skipper); |
-+} |
-+ |
-+bool ExtensionSet::ParseMessageSetItem(io::CodedInputStream* input, |
-+ ExtensionFinder* extension_finder, |
-+ FieldSkipper* field_skipper) { |
-+ // TODO(kenton): It would be nice to share code between this and |
-+ // WireFormatLite::ParseAndMergeMessageSetItem(), but I think the |
-+ // differences would be hard to factor out. |
-+ |
-+ // This method parses a group which should contain two fields: |
-+ // required int32 type_id = 2; |
-+ // required data message = 3; |
-+ |
-+ uint32 last_type_id = 0; |
-+ |
-+ // If we see message data before the type_id, we'll append it to this so |
-+ // we can parse it later. |
-+ string message_data; |
-+ |
-+ while (true) { |
-+ const uint32 tag = input->ReadTag(); |
-+ if (tag == 0) return false; |
-+ |
-+ switch (tag) { |
-+ case WireFormatLite::kMessageSetTypeIdTag: { |
-+ uint32 type_id; |
-+ if (!input->ReadVarint32(&type_id)) return false; |
-+ last_type_id = type_id; |
-+ |
-+ if (!message_data.empty()) { |
-+ // We saw some message data before the type_id. Have to parse it |
-+ // now. |
-+ io::CodedInputStream sub_input( |
-+ reinterpret_cast<const uint8*>(message_data.data()), |
-+ message_data.size()); |
-+ if (!ParseFieldMaybeLazily(WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
-+ last_type_id, &sub_input, |
-+ extension_finder, field_skipper)) { |
-+ return false; |
-+ } |
-+ message_data.clear(); |
-+ } |
-+ |
-+ break; |
-+ } |
-+ |
-+ case WireFormatLite::kMessageSetMessageTag: { |
-+ if (last_type_id == 0) { |
-+ // We haven't seen a type_id yet. Append this data to message_data. |
-+ string temp; |
-+ uint32 length; |
-+ if (!input->ReadVarint32(&length)) return false; |
-+ if (!input->ReadString(&temp, length)) return false; |
-+ io::StringOutputStream output_stream(&message_data); |
-+ io::CodedOutputStream coded_output(&output_stream); |
-+ coded_output.WriteVarint32(length); |
-+ coded_output.WriteString(temp); |
-+ } else { |
-+ // Already saw type_id, so we can parse this directly. |
-+ if (!ParseFieldMaybeLazily(WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
-+ last_type_id, input, |
-+ extension_finder, field_skipper)) { |
-+ return false; |
-+ } |
-+ } |
-+ |
-+ break; |
-+ } |
-+ |
-+ case WireFormatLite::kMessageSetItemEndTag: { |
-+ return true; |
-+ } |
-+ |
-+ default: { |
-+ if (!field_skipper->SkipField(input, tag)) return false; |
-+ } |
-+ } |
-+ } |
-+} |
- |
- void ExtensionSet::SerializeWithCachedSizes( |
- int start_field_number, int end_field_number, |
-diff --git a/third_party/protobuf/src/google/protobuf/extension_set.h b/third_party/protobuf/src/google/protobuf/extension_set.h |
-index c371e01..25acee7 100644 |
---- a/third_party/protobuf/src/google/protobuf/extension_set.h |
-+++ b/third_party/protobuf/src/google/protobuf/extension_set.h |
-@@ -138,9 +138,6 @@ class LIBPROTOBUF_EXPORT GeneratedExtensionFinder : public ExtensionFinder { |
- const MessageLite* containing_type_; |
- }; |
- |
--// A FieldSkipper used for parsing MessageSet. |
--class MessageSetFieldSkipper; |
-- |
- // Note: extension_set_heavy.cc defines DescriptorPoolExtensionFinder for |
- // finding extensions from a DescriptorPool. |
- |
-@@ -366,25 +363,31 @@ class LIBPROTOBUF_EXPORT ExtensionSet { |
- bool ParseField(uint32 tag, io::CodedInputStream* input, |
- const MessageLite* containing_type); |
- bool ParseField(uint32 tag, io::CodedInputStream* input, |
-- const Message* containing_type, |
-+ const MessageLite* containing_type, |
- UnknownFieldSet* unknown_fields); |
- bool ParseField(uint32 tag, io::CodedInputStream* input, |
- const MessageLite* containing_type, |
- io::CodedOutputStream* unknown_fields); |
-+ bool ParseFieldHeavy(uint32 tag, io::CodedInputStream* input, |
-+ const Message* containing_type, |
-+ UnknownFieldSet* unknown_fields); |
- |
- // Parse an entire message in MessageSet format. Such messages have no |
- // fields, only extensions. |
- bool ParseMessageSet(io::CodedInputStream* input, |
- ExtensionFinder* extension_finder, |
-- MessageSetFieldSkipper* field_skipper); |
-+ FieldSkipper* field_skipper); |
- |
- // Specific versions for lite or full messages (constructs the appropriate |
- // FieldSkipper automatically). |
- bool ParseMessageSet(io::CodedInputStream* input, |
- const MessageLite* containing_type); |
- bool ParseMessageSet(io::CodedInputStream* input, |
-- const Message* containing_type, |
-+ const MessageLite* containing_type, |
- UnknownFieldSet* unknown_fields); |
-+ bool ParseMessageSetHeavy(io::CodedInputStream* input, |
-+ const Message* containing_type, |
-+ UnknownFieldSet* unknown_fields); |
- |
- // Write all extension fields with field numbers in the range |
- // [start_field_number, end_field_number) |
-@@ -571,7 +574,7 @@ class LIBPROTOBUF_EXPORT ExtensionSet { |
- bool ParseFieldMaybeLazily(int wire_type, int field_number, |
- io::CodedInputStream* input, |
- ExtensionFinder* extension_finder, |
-- MessageSetFieldSkipper* field_skipper); |
-+ FieldSkipper* field_skipper); |
- |
- // Gets the extension with the given number, creating it if it does not |
- // already exist. Returns true if the extension did not already exist. |
-@@ -582,7 +585,7 @@ class LIBPROTOBUF_EXPORT ExtensionSet { |
- // tag has been read. |
- bool ParseMessageSetItem(io::CodedInputStream* input, |
- ExtensionFinder* extension_finder, |
-- MessageSetFieldSkipper* field_skipper); |
-+ FieldSkipper* field_skipper); |
- |
- // Hack: RepeatedPtrFieldBase declares ExtensionSet as a friend. This |
- // friendship should automatically extend to ExtensionSet::Extension, but |
-diff --git a/third_party/protobuf/src/google/protobuf/extension_set_heavy.cc b/third_party/protobuf/src/google/protobuf/extension_set_heavy.cc |
-index 330bd82..58f742b 100644 |
---- a/third_party/protobuf/src/google/protobuf/extension_set_heavy.cc |
-+++ b/third_party/protobuf/src/google/protobuf/extension_set_heavy.cc |
-@@ -48,30 +48,6 @@ namespace google { |
- namespace protobuf { |
- namespace internal { |
- |
--// A FieldSkipper used to store unknown MessageSet fields into UnknownFieldSet. |
--class MessageSetFieldSkipper |
-- : public UnknownFieldSetFieldSkipper { |
-- public: |
-- explicit MessageSetFieldSkipper(UnknownFieldSet* unknown_fields) |
-- : UnknownFieldSetFieldSkipper(unknown_fields) {} |
-- virtual ~MessageSetFieldSkipper() {} |
-- |
-- virtual bool SkipMessageSetField(io::CodedInputStream* input, |
-- int field_number); |
--}; |
--bool MessageSetFieldSkipper::SkipMessageSetField( |
-- io::CodedInputStream* input, int field_number) { |
-- uint32 length; |
-- if (!input->ReadVarint32(&length)) return false; |
-- if (unknown_fields_ == NULL) { |
-- return input->Skip(length); |
-- } else { |
-- return input->ReadString( |
-- unknown_fields_->AddLengthDelimited(field_number), length); |
-- } |
--} |
-- |
-- |
- // Implementation of ExtensionFinder which finds extensions in a given |
- // DescriptorPool, using the given MessageFactory to construct sub-objects. |
- // This class is implemented in extension_set_heavy.cc. |
-@@ -274,10 +250,10 @@ bool DescriptorPoolExtensionFinder::Find(int number, ExtensionInfo* output) { |
- } |
- } |
- |
--bool ExtensionSet::ParseField(uint32 tag, io::CodedInputStream* input, |
-- const Message* containing_type, |
-- UnknownFieldSet* unknown_fields) { |
-- UnknownFieldSetFieldSkipper skipper(unknown_fields); |
-+bool ExtensionSet::ParseFieldHeavy(uint32 tag, io::CodedInputStream* input, |
-+ const Message* containing_type, |
-+ UnknownFieldSet* unknown_fields) { |
-+ FieldSkipper skipper(unknown_fields); |
- if (input->GetExtensionPool() == NULL) { |
- GeneratedExtensionFinder finder(containing_type); |
- return ParseField(tag, input, &finder, &skipper); |
-@@ -289,10 +265,10 @@ bool ExtensionSet::ParseField(uint32 tag, io::CodedInputStream* input, |
- } |
- } |
- |
--bool ExtensionSet::ParseMessageSet(io::CodedInputStream* input, |
-- const Message* containing_type, |
-- UnknownFieldSet* unknown_fields) { |
-- MessageSetFieldSkipper skipper(unknown_fields); |
-+bool ExtensionSet::ParseMessageSetHeavy(io::CodedInputStream* input, |
-+ const Message* containing_type, |
-+ UnknownFieldSet* unknown_fields) { |
-+ FieldSkipper skipper(unknown_fields); |
- if (input->GetExtensionPool() == NULL) { |
- GeneratedExtensionFinder finder(containing_type); |
- return ParseMessageSet(input, &finder, &skipper); |
-@@ -541,122 +517,6 @@ uint8* ExtensionSet::Extension::SerializeMessageSetItemWithCachedSizesToArray( |
- } |
- |
- |
--bool ExtensionSet::ParseFieldMaybeLazily( |
-- int wire_type, int field_number, io::CodedInputStream* input, |
-- ExtensionFinder* extension_finder, |
-- MessageSetFieldSkipper* field_skipper) { |
-- return ParseField(WireFormatLite::MakeTag( |
-- field_number, static_cast<WireFormatLite::WireType>(wire_type)), |
-- input, extension_finder, field_skipper); |
--} |
-- |
--bool ExtensionSet::ParseMessageSet(io::CodedInputStream* input, |
-- ExtensionFinder* extension_finder, |
-- MessageSetFieldSkipper* field_skipper) { |
-- while (true) { |
-- const uint32 tag = input->ReadTag(); |
-- switch (tag) { |
-- case 0: |
-- return true; |
-- case WireFormatLite::kMessageSetItemStartTag: |
-- if (!ParseMessageSetItem(input, extension_finder, field_skipper)) { |
-- return false; |
-- } |
-- break; |
-- default: |
-- if (!ParseField(tag, input, extension_finder, field_skipper)) { |
-- return false; |
-- } |
-- break; |
-- } |
-- } |
--} |
-- |
--bool ExtensionSet::ParseMessageSet(io::CodedInputStream* input, |
-- const MessageLite* containing_type) { |
-- MessageSetFieldSkipper skipper(NULL); |
-- GeneratedExtensionFinder finder(containing_type); |
-- return ParseMessageSet(input, &finder, &skipper); |
--} |
-- |
--bool ExtensionSet::ParseMessageSetItem(io::CodedInputStream* input, |
-- ExtensionFinder* extension_finder, |
-- MessageSetFieldSkipper* field_skipper) { |
-- // TODO(kenton): It would be nice to share code between this and |
-- // WireFormatLite::ParseAndMergeMessageSetItem(), but I think the |
-- // differences would be hard to factor out. |
-- |
-- // This method parses a group which should contain two fields: |
-- // required int32 type_id = 2; |
-- // required data message = 3; |
-- |
-- uint32 last_type_id = 0; |
-- |
-- // If we see message data before the type_id, we'll append it to this so |
-- // we can parse it later. |
-- string message_data; |
-- |
-- while (true) { |
-- const uint32 tag = input->ReadTag(); |
-- if (tag == 0) return false; |
-- |
-- switch (tag) { |
-- case WireFormatLite::kMessageSetTypeIdTag: { |
-- uint32 type_id; |
-- if (!input->ReadVarint32(&type_id)) return false; |
-- last_type_id = type_id; |
-- |
-- if (!message_data.empty()) { |
-- // We saw some message data before the type_id. Have to parse it |
-- // now. |
-- io::CodedInputStream sub_input( |
-- reinterpret_cast<const uint8*>(message_data.data()), |
-- message_data.size()); |
-- if (!ParseFieldMaybeLazily(WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
-- last_type_id, &sub_input, |
-- extension_finder, field_skipper)) { |
-- return false; |
-- } |
-- message_data.clear(); |
-- } |
-- |
-- break; |
-- } |
-- |
-- case WireFormatLite::kMessageSetMessageTag: { |
-- if (last_type_id == 0) { |
-- // We haven't seen a type_id yet. Append this data to message_data. |
-- string temp; |
-- uint32 length; |
-- if (!input->ReadVarint32(&length)) return false; |
-- if (!input->ReadString(&temp, length)) return false; |
-- io::StringOutputStream output_stream(&message_data); |
-- io::CodedOutputStream coded_output(&output_stream); |
-- coded_output.WriteVarint32(length); |
-- coded_output.WriteString(temp); |
-- } else { |
-- // Already saw type_id, so we can parse this directly. |
-- if (!ParseFieldMaybeLazily(WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
-- last_type_id, input, |
-- extension_finder, field_skipper)) { |
-- return false; |
-- } |
-- } |
-- |
-- break; |
-- } |
-- |
-- case WireFormatLite::kMessageSetItemEndTag: { |
-- return true; |
-- } |
-- |
-- default: { |
-- if (!field_skipper->SkipField(input, tag)) return false; |
-- } |
-- } |
-- } |
--} |
-- |
- void ExtensionSet::Extension::SerializeMessageSetItemWithCachedSizes( |
- int number, |
- io::CodedOutputStream* output) const { |
-diff --git a/third_party/protobuf/src/google/protobuf/generated_message_reflection.cc b/third_party/protobuf/src/google/protobuf/generated_message_reflection.cc |
-index 412c48a..0b01e73 100644 |
---- a/third_party/protobuf/src/google/protobuf/generated_message_reflection.cc |
-+++ b/third_party/protobuf/src/google/protobuf/generated_message_reflection.cc |
-@@ -57,18 +57,6 @@ bool IsMapFieldInApi(const FieldDescriptor* field) { |
- } |
- } // anonymous namespace |
- |
--int StringSpaceUsedExcludingSelf(const string& str) { |
-- const void* start = &str; |
-- const void* end = &str + 1; |
-- |
-- if (start <= str.data() && str.data() < end) { |
-- // The string's data is stored inside the string object itself. |
-- return 0; |
-- } else { |
-- return str.capacity(); |
-- } |
--} |
-- |
- bool ParseNamedEnum(const EnumDescriptor* descriptor, |
- const string& name, |
- int* value) { |
-diff --git a/third_party/protobuf/src/google/protobuf/generated_message_util.cc b/third_party/protobuf/src/google/protobuf/generated_message_util.cc |
-index 53cae8b..e8fb398 100644 |
---- a/third_party/protobuf/src/google/protobuf/generated_message_util.cc |
-+++ b/third_party/protobuf/src/google/protobuf/generated_message_util.cc |
-@@ -60,6 +60,17 @@ void InitEmptyString() { |
- OnShutdown(&DeleteEmptyString); |
- } |
- |
-+int StringSpaceUsedExcludingSelf(const string& str) { |
-+ const void* start = &str; |
-+ const void* end = &str + 1; |
-+ |
-+ if (start <= str.data() && str.data() < end) { |
-+ // The string's data is stored inside the string object itself. |
-+ return 0; |
-+ } else { |
-+ return str.capacity(); |
-+ } |
-+} |
- |
- } // namespace internal |
- } // namespace protobuf |
-diff --git a/third_party/protobuf/src/google/protobuf/unknown_field_set.cc b/third_party/protobuf/src/google/protobuf/unknown_field_set.cc |
-index 93f0f20..7e04a0e 100644 |
---- a/third_party/protobuf/src/google/protobuf/unknown_field_set.cc |
-+++ b/third_party/protobuf/src/google/protobuf/unknown_field_set.cc |
-@@ -35,10 +35,12 @@ |
- #include <google/protobuf/unknown_field_set.h> |
- |
- #include <google/protobuf/stubs/common.h> |
-+#include <google/protobuf/stubs/once.h> |
- #include <google/protobuf/io/coded_stream.h> |
- #include <google/protobuf/io/zero_copy_stream.h> |
--#include <google/protobuf/io/zero_copy_stream_impl.h> |
--#include <google/protobuf/wire_format.h> |
-+#include <google/protobuf/io/zero_copy_stream_impl_lite.h> |
-+#include <google/protobuf/generated_message_util.h> |
-+#include <google/protobuf/wire_format_lite.h> |
- #include <google/protobuf/stubs/stl_util.h> |
- |
- namespace google { |
-@@ -254,7 +256,7 @@ void UnknownFieldSet::DeleteByNumber(int number) { |
- |
- bool UnknownFieldSet::MergeFromCodedStream(io::CodedInputStream* input) { |
- UnknownFieldSet other; |
-- if (internal::WireFormat::SkipMessage(input, &other) && |
-+ if (internal::WireFormatLite::SkipMessage(input, &other) && |
- input->ConsumedEntireMessage()) { |
- MergeFromAndDestroy(&other); |
- return true; |
-diff --git a/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc b/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc |
-index 53a0e47..8e0897d 100644 |
---- a/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc |
-+++ b/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc |
-@@ -162,7 +162,7 @@ Status ProtoStreamObjectSource::WriteMessage(const google::protobuf::Type& type, |
- if (field == NULL) { |
- // If we didn't find a field, skip this unknown tag. |
- // TODO(wpoon): Check return boolean value. |
-- WireFormat::SkipField(stream_, tag, NULL); |
-+ WireFormatLite::SkipField(stream_, tag); |
- tag = stream_->ReadTag(); |
- continue; |
- } |
-@@ -239,7 +239,7 @@ Status ProtoStreamObjectSource::RenderMapEntry( |
- for (uint32 tag = stream_->ReadTag(); tag != 0; tag = stream_->ReadTag()) { |
- const google::protobuf::Field* field = FindAndVerifyField(*type, tag); |
- if (field == NULL) { |
-- WireFormat::SkipField(stream_, tag, NULL); |
-+ WireFormatLite::SkipField(stream_, tag); |
- continue; |
- } |
- // Map field numbers are key = 1 and value = 2 |
-@@ -506,7 +506,7 @@ Status ProtoStreamObjectSource::RenderStructValue( |
- tag = os->stream_->ReadTag()) { |
- field = os->FindAndVerifyField(type, tag); |
- if (field == NULL) { |
-- WireFormat::SkipField(os->stream_, tag, NULL); |
-+ WireFormatLite::SkipField(os->stream_, tag); |
- continue; |
- } |
- RETURN_IF_ERROR(os->RenderField(field, field_name, ow)); |
-@@ -530,7 +530,7 @@ Status ProtoStreamObjectSource::RenderStructListValue( |
- while (tag != 0) { |
- const google::protobuf::Field* field = os->FindAndVerifyField(type, tag); |
- if (field == NULL) { |
-- WireFormat::SkipField(os->stream_, tag, NULL); |
-+ WireFormatLite::SkipField(os->stream_, tag); |
- tag = os->stream_->ReadTag(); |
- continue; |
- } |
-@@ -552,7 +552,7 @@ Status ProtoStreamObjectSource::RenderAny(const ProtoStreamObjectSource* os, |
- for (tag = os->stream_->ReadTag(); tag != 0; tag = os->stream_->ReadTag()) { |
- const google::protobuf::Field* field = os->FindAndVerifyField(type, tag); |
- if (field == NULL) { |
-- WireFormat::SkipField(os->stream_, tag, NULL); |
-+ WireFormatLite::SkipField(os->stream_, tag); |
- continue; |
- } |
- // 'type_url' has field number of 1 and 'value' has field number 2 |
-@@ -982,7 +982,7 @@ std::pair<int64, int32> ProtoStreamObjectSource::ReadSecondsAndNanos( |
- for (tag = stream_->ReadTag(); tag != 0; tag = stream_->ReadTag()) { |
- const google::protobuf::Field* field = FindAndVerifyField(type, tag); |
- if (field == NULL) { |
-- WireFormat::SkipField(stream_, tag, NULL); |
-+ WireFormatLite::SkipField(stream_, tag); |
- continue; |
- } |
- // 'seconds' has field number of 1 and 'nanos' has field number 2 |
-diff --git a/third_party/protobuf/src/google/protobuf/wire_format.cc b/third_party/protobuf/src/google/protobuf/wire_format.cc |
-index c5db963..7021f8e 100644 |
---- a/third_party/protobuf/src/google/protobuf/wire_format.cc |
-+++ b/third_party/protobuf/src/google/protobuf/wire_format.cc |
-@@ -54,329 +54,6 @@ namespace google { |
- namespace protobuf { |
- namespace internal { |
- |
--// =================================================================== |
-- |
--bool UnknownFieldSetFieldSkipper::SkipField( |
-- io::CodedInputStream* input, uint32 tag) { |
-- return WireFormat::SkipField(input, tag, unknown_fields_); |
--} |
-- |
--bool UnknownFieldSetFieldSkipper::SkipMessage(io::CodedInputStream* input) { |
-- return WireFormat::SkipMessage(input, unknown_fields_); |
--} |
-- |
--void UnknownFieldSetFieldSkipper::SkipUnknownEnum( |
-- int field_number, int value) { |
-- unknown_fields_->AddVarint(field_number, value); |
--} |
-- |
--bool WireFormat::SkipField(io::CodedInputStream* input, uint32 tag, |
-- UnknownFieldSet* unknown_fields) { |
-- int number = WireFormatLite::GetTagFieldNumber(tag); |
-- |
-- switch (WireFormatLite::GetTagWireType(tag)) { |
-- case WireFormatLite::WIRETYPE_VARINT: { |
-- uint64 value; |
-- if (!input->ReadVarint64(&value)) return false; |
-- if (unknown_fields != NULL) unknown_fields->AddVarint(number, value); |
-- return true; |
-- } |
-- case WireFormatLite::WIRETYPE_FIXED64: { |
-- uint64 value; |
-- if (!input->ReadLittleEndian64(&value)) return false; |
-- if (unknown_fields != NULL) unknown_fields->AddFixed64(number, value); |
-- return true; |
-- } |
-- case WireFormatLite::WIRETYPE_LENGTH_DELIMITED: { |
-- uint32 length; |
-- if (!input->ReadVarint32(&length)) return false; |
-- if (unknown_fields == NULL) { |
-- if (!input->Skip(length)) return false; |
-- } else { |
-- if (!input->ReadString(unknown_fields->AddLengthDelimited(number), |
-- length)) { |
-- return false; |
-- } |
-- } |
-- return true; |
-- } |
-- case WireFormatLite::WIRETYPE_START_GROUP: { |
-- if (!input->IncrementRecursionDepth()) return false; |
-- if (!SkipMessage(input, (unknown_fields == NULL) ? |
-- NULL : unknown_fields->AddGroup(number))) { |
-- return false; |
-- } |
-- input->DecrementRecursionDepth(); |
-- // Check that the ending tag matched the starting tag. |
-- if (!input->LastTagWas(WireFormatLite::MakeTag( |
-- WireFormatLite::GetTagFieldNumber(tag), |
-- WireFormatLite::WIRETYPE_END_GROUP))) { |
-- return false; |
-- } |
-- return true; |
-- } |
-- case WireFormatLite::WIRETYPE_END_GROUP: { |
-- return false; |
-- } |
-- case WireFormatLite::WIRETYPE_FIXED32: { |
-- uint32 value; |
-- if (!input->ReadLittleEndian32(&value)) return false; |
-- if (unknown_fields != NULL) unknown_fields->AddFixed32(number, value); |
-- return true; |
-- } |
-- default: { |
-- return false; |
-- } |
-- } |
--} |
-- |
--bool WireFormat::SkipMessage(io::CodedInputStream* input, |
-- UnknownFieldSet* unknown_fields) { |
-- while (true) { |
-- uint32 tag = input->ReadTag(); |
-- if (tag == 0) { |
-- // End of input. This is a valid place to end, so return true. |
-- return true; |
-- } |
-- |
-- WireFormatLite::WireType wire_type = WireFormatLite::GetTagWireType(tag); |
-- |
-- if (wire_type == WireFormatLite::WIRETYPE_END_GROUP) { |
-- // Must be the end of the message. |
-- return true; |
-- } |
-- |
-- if (!SkipField(input, tag, unknown_fields)) return false; |
-- } |
--} |
-- |
--bool WireFormat::ReadPackedEnumPreserveUnknowns(io::CodedInputStream* input, |
-- uint32 field_number, |
-- bool (*is_valid)(int), |
-- UnknownFieldSet* unknown_fields, |
-- RepeatedField<int>* values) { |
-- uint32 length; |
-- if (!input->ReadVarint32(&length)) return false; |
-- io::CodedInputStream::Limit limit = input->PushLimit(length); |
-- while (input->BytesUntilLimit() > 0) { |
-- int value; |
-- if (!google::protobuf::internal::WireFormatLite::ReadPrimitive< |
-- int, WireFormatLite::TYPE_ENUM>(input, &value)) { |
-- return false; |
-- } |
-- if (is_valid == NULL || is_valid(value)) { |
-- values->Add(value); |
-- } else { |
-- unknown_fields->AddVarint(field_number, value); |
-- } |
-- } |
-- input->PopLimit(limit); |
-- return true; |
--} |
-- |
-- |
--void WireFormat::SerializeUnknownFields(const UnknownFieldSet& unknown_fields, |
-- io::CodedOutputStream* output) { |
-- for (int i = 0; i < unknown_fields.field_count(); i++) { |
-- const UnknownField& field = unknown_fields.field(i); |
-- switch (field.type()) { |
-- case UnknownField::TYPE_VARINT: |
-- output->WriteVarint32(WireFormatLite::MakeTag(field.number(), |
-- WireFormatLite::WIRETYPE_VARINT)); |
-- output->WriteVarint64(field.varint()); |
-- break; |
-- case UnknownField::TYPE_FIXED32: |
-- output->WriteVarint32(WireFormatLite::MakeTag(field.number(), |
-- WireFormatLite::WIRETYPE_FIXED32)); |
-- output->WriteLittleEndian32(field.fixed32()); |
-- break; |
-- case UnknownField::TYPE_FIXED64: |
-- output->WriteVarint32(WireFormatLite::MakeTag(field.number(), |
-- WireFormatLite::WIRETYPE_FIXED64)); |
-- output->WriteLittleEndian64(field.fixed64()); |
-- break; |
-- case UnknownField::TYPE_LENGTH_DELIMITED: |
-- output->WriteVarint32(WireFormatLite::MakeTag(field.number(), |
-- WireFormatLite::WIRETYPE_LENGTH_DELIMITED)); |
-- output->WriteVarint32(field.length_delimited().size()); |
-- output->WriteRawMaybeAliased(field.length_delimited().data(), |
-- field.length_delimited().size()); |
-- break; |
-- case UnknownField::TYPE_GROUP: |
-- output->WriteVarint32(WireFormatLite::MakeTag(field.number(), |
-- WireFormatLite::WIRETYPE_START_GROUP)); |
-- SerializeUnknownFields(field.group(), output); |
-- output->WriteVarint32(WireFormatLite::MakeTag(field.number(), |
-- WireFormatLite::WIRETYPE_END_GROUP)); |
-- break; |
-- } |
-- } |
--} |
-- |
--uint8* WireFormat::SerializeUnknownFieldsToArray( |
-- const UnknownFieldSet& unknown_fields, |
-- uint8* target) { |
-- for (int i = 0; i < unknown_fields.field_count(); i++) { |
-- const UnknownField& field = unknown_fields.field(i); |
-- |
-- switch (field.type()) { |
-- case UnknownField::TYPE_VARINT: |
-- target = WireFormatLite::WriteInt64ToArray( |
-- field.number(), field.varint(), target); |
-- break; |
-- case UnknownField::TYPE_FIXED32: |
-- target = WireFormatLite::WriteFixed32ToArray( |
-- field.number(), field.fixed32(), target); |
-- break; |
-- case UnknownField::TYPE_FIXED64: |
-- target = WireFormatLite::WriteFixed64ToArray( |
-- field.number(), field.fixed64(), target); |
-- break; |
-- case UnknownField::TYPE_LENGTH_DELIMITED: |
-- target = WireFormatLite::WriteBytesToArray( |
-- field.number(), field.length_delimited(), target); |
-- break; |
-- case UnknownField::TYPE_GROUP: |
-- target = WireFormatLite::WriteTagToArray( |
-- field.number(), WireFormatLite::WIRETYPE_START_GROUP, target); |
-- target = SerializeUnknownFieldsToArray(field.group(), target); |
-- target = WireFormatLite::WriteTagToArray( |
-- field.number(), WireFormatLite::WIRETYPE_END_GROUP, target); |
-- break; |
-- } |
-- } |
-- return target; |
--} |
-- |
--void WireFormat::SerializeUnknownMessageSetItems( |
-- const UnknownFieldSet& unknown_fields, |
-- io::CodedOutputStream* output) { |
-- for (int i = 0; i < unknown_fields.field_count(); i++) { |
-- const UnknownField& field = unknown_fields.field(i); |
-- // The only unknown fields that are allowed to exist in a MessageSet are |
-- // messages, which are length-delimited. |
-- if (field.type() == UnknownField::TYPE_LENGTH_DELIMITED) { |
-- // Start group. |
-- output->WriteVarint32(WireFormatLite::kMessageSetItemStartTag); |
-- |
-- // Write type ID. |
-- output->WriteVarint32(WireFormatLite::kMessageSetTypeIdTag); |
-- output->WriteVarint32(field.number()); |
-- |
-- // Write message. |
-- output->WriteVarint32(WireFormatLite::kMessageSetMessageTag); |
-- field.SerializeLengthDelimitedNoTag(output); |
-- |
-- // End group. |
-- output->WriteVarint32(WireFormatLite::kMessageSetItemEndTag); |
-- } |
-- } |
--} |
-- |
--uint8* WireFormat::SerializeUnknownMessageSetItemsToArray( |
-- const UnknownFieldSet& unknown_fields, |
-- uint8* target) { |
-- for (int i = 0; i < unknown_fields.field_count(); i++) { |
-- const UnknownField& field = unknown_fields.field(i); |
-- |
-- // The only unknown fields that are allowed to exist in a MessageSet are |
-- // messages, which are length-delimited. |
-- if (field.type() == UnknownField::TYPE_LENGTH_DELIMITED) { |
-- // Start group. |
-- target = io::CodedOutputStream::WriteTagToArray( |
-- WireFormatLite::kMessageSetItemStartTag, target); |
-- |
-- // Write type ID. |
-- target = io::CodedOutputStream::WriteTagToArray( |
-- WireFormatLite::kMessageSetTypeIdTag, target); |
-- target = io::CodedOutputStream::WriteVarint32ToArray( |
-- field.number(), target); |
-- |
-- // Write message. |
-- target = io::CodedOutputStream::WriteTagToArray( |
-- WireFormatLite::kMessageSetMessageTag, target); |
-- target = field.SerializeLengthDelimitedNoTagToArray(target); |
-- |
-- // End group. |
-- target = io::CodedOutputStream::WriteTagToArray( |
-- WireFormatLite::kMessageSetItemEndTag, target); |
-- } |
-- } |
-- |
-- return target; |
--} |
-- |
--int WireFormat::ComputeUnknownFieldsSize( |
-- const UnknownFieldSet& unknown_fields) { |
-- int size = 0; |
-- for (int i = 0; i < unknown_fields.field_count(); i++) { |
-- const UnknownField& field = unknown_fields.field(i); |
-- |
-- switch (field.type()) { |
-- case UnknownField::TYPE_VARINT: |
-- size += io::CodedOutputStream::VarintSize32( |
-- WireFormatLite::MakeTag(field.number(), |
-- WireFormatLite::WIRETYPE_VARINT)); |
-- size += io::CodedOutputStream::VarintSize64(field.varint()); |
-- break; |
-- case UnknownField::TYPE_FIXED32: |
-- size += io::CodedOutputStream::VarintSize32( |
-- WireFormatLite::MakeTag(field.number(), |
-- WireFormatLite::WIRETYPE_FIXED32)); |
-- size += sizeof(int32); |
-- break; |
-- case UnknownField::TYPE_FIXED64: |
-- size += io::CodedOutputStream::VarintSize32( |
-- WireFormatLite::MakeTag(field.number(), |
-- WireFormatLite::WIRETYPE_FIXED64)); |
-- size += sizeof(int64); |
-- break; |
-- case UnknownField::TYPE_LENGTH_DELIMITED: |
-- size += io::CodedOutputStream::VarintSize32( |
-- WireFormatLite::MakeTag(field.number(), |
-- WireFormatLite::WIRETYPE_LENGTH_DELIMITED)); |
-- size += io::CodedOutputStream::VarintSize32( |
-- field.length_delimited().size()); |
-- size += field.length_delimited().size(); |
-- break; |
-- case UnknownField::TYPE_GROUP: |
-- size += io::CodedOutputStream::VarintSize32( |
-- WireFormatLite::MakeTag(field.number(), |
-- WireFormatLite::WIRETYPE_START_GROUP)); |
-- size += ComputeUnknownFieldsSize(field.group()); |
-- size += io::CodedOutputStream::VarintSize32( |
-- WireFormatLite::MakeTag(field.number(), |
-- WireFormatLite::WIRETYPE_END_GROUP)); |
-- break; |
-- } |
-- } |
-- |
-- return size; |
--} |
-- |
--int WireFormat::ComputeUnknownMessageSetItemsSize( |
-- const UnknownFieldSet& unknown_fields) { |
-- int size = 0; |
-- for (int i = 0; i < unknown_fields.field_count(); i++) { |
-- const UnknownField& field = unknown_fields.field(i); |
-- |
-- // The only unknown fields that are allowed to exist in a MessageSet are |
-- // messages, which are length-delimited. |
-- if (field.type() == UnknownField::TYPE_LENGTH_DELIMITED) { |
-- size += WireFormatLite::kMessageSetItemTagsSize; |
-- size += io::CodedOutputStream::VarintSize32(field.number()); |
-- |
-- int field_size = field.GetLengthDelimitedSize(); |
-- size += io::CodedOutputStream::VarintSize32(field_size); |
-- size += field_size; |
-- } |
-- } |
-- |
-- return size; |
--} |
-- |
--// =================================================================== |
-- |
- bool WireFormat::ParseAndMergePartial(io::CodedInputStream* input, |
- Message* message) { |
- const Descriptor* descriptor = message->GetDescriptor(); |
-@@ -485,8 +162,8 @@ bool WireFormat::ParseAndMergeField( |
- } |
- |
- if (value_format == UNKNOWN) { |
-- return SkipField(input, tag, |
-- message_reflection->MutableUnknownFields(message)); |
-+ return WireFormatLite::SkipField( |
-+ input, tag, message_reflection->MutableUnknownFields(message)); |
- } else if (value_format == PACKED_FORMAT) { |
- uint32 length; |
- if (!input->ReadVarint32(&length)) return false; |
-@@ -763,7 +440,7 @@ bool WireFormat::ParseAndMergeMessageSetItem( |
- } |
- |
- default: { |
-- if (!SkipField(input, tag, NULL)) return false; |
-+ if (!WireFormatLite::SkipField(input, tag)) return false; |
- } |
- } |
- } |
-@@ -785,10 +462,10 @@ void WireFormat::SerializeWithCachedSizes( |
- } |
- |
- if (descriptor->options().message_set_wire_format()) { |
-- SerializeUnknownMessageSetItems( |
-+ WireFormatLite::SerializeUnknownMessageSetItems( |
- message_reflection->GetUnknownFields(message), output); |
- } else { |
-- SerializeUnknownFields( |
-+ WireFormatLite::SerializeUnknownFields( |
- message_reflection->GetUnknownFields(message), output); |
- } |
- |
-@@ -956,10 +633,10 @@ int WireFormat::ByteSize(const Message& message) { |
- } |
- |
- if (descriptor->options().message_set_wire_format()) { |
-- our_size += ComputeUnknownMessageSetItemsSize( |
-+ our_size += WireFormatLite::ComputeUnknownMessageSetItemsSize( |
- message_reflection->GetUnknownFields(message)); |
- } else { |
-- our_size += ComputeUnknownFieldsSize( |
-+ our_size += WireFormatLite::ComputeUnknownFieldsSize( |
- message_reflection->GetUnknownFields(message)); |
- } |
- |
-diff --git a/third_party/protobuf/src/google/protobuf/wire_format.h b/third_party/protobuf/src/google/protobuf/wire_format.h |
-index 84270fe..860db13 100644 |
---- a/third_party/protobuf/src/google/protobuf/wire_format.h |
-+++ b/third_party/protobuf/src/google/protobuf/wire_format.h |
-@@ -57,7 +57,6 @@ namespace protobuf { |
- class CodedInputStream; // coded_stream.h |
- class CodedOutputStream; // coded_stream.h |
- } |
-- class UnknownFieldSet; // unknown_field_set.h |
- } |
- |
- namespace protobuf { |
-@@ -124,62 +123,6 @@ class LIBPROTOBUF_EXPORT WireFormat { |
- // WireFormat::SerializeWithCachedSizes() on the same object. |
- static int ByteSize(const Message& message); |
- |
-- // ----------------------------------------------------------------- |
-- // Helpers for dealing with unknown fields |
-- |
-- // Skips a field value of the given WireType. The input should start |
-- // positioned immediately after the tag. If unknown_fields is non-NULL, |
-- // the contents of the field will be added to it. |
-- static bool SkipField(io::CodedInputStream* input, uint32 tag, |
-- UnknownFieldSet* unknown_fields); |
-- |
-- // Reads and ignores a message from the input. If unknown_fields is non-NULL, |
-- // the contents will be added to it. |
-- static bool SkipMessage(io::CodedInputStream* input, |
-- UnknownFieldSet* unknown_fields); |
-- |
-- // Read a packed enum field. If the is_valid function is not NULL, values for |
-- // which is_valid(value) returns false are appended to unknown_fields_stream. |
-- static bool ReadPackedEnumPreserveUnknowns(io::CodedInputStream* input, |
-- uint32 field_number, |
-- bool (*is_valid)(int), |
-- UnknownFieldSet* unknown_fields, |
-- RepeatedField<int>* values); |
-- |
-- // Write the contents of an UnknownFieldSet to the output. |
-- static void SerializeUnknownFields(const UnknownFieldSet& unknown_fields, |
-- io::CodedOutputStream* output); |
-- // Same as above, except writing directly to the provided buffer. |
-- // Requires that the buffer have sufficient capacity for |
-- // ComputeUnknownFieldsSize(unknown_fields). |
-- // |
-- // Returns a pointer past the last written byte. |
-- static uint8* SerializeUnknownFieldsToArray( |
-- const UnknownFieldSet& unknown_fields, |
-- uint8* target); |
-- |
-- // Same thing except for messages that have the message_set_wire_format |
-- // option. |
-- static void SerializeUnknownMessageSetItems( |
-- const UnknownFieldSet& unknown_fields, |
-- io::CodedOutputStream* output); |
-- // Same as above, except writing directly to the provided buffer. |
-- // Requires that the buffer have sufficient capacity for |
-- // ComputeUnknownMessageSetItemsSize(unknown_fields). |
-- // |
-- // Returns a pointer past the last written byte. |
-- static uint8* SerializeUnknownMessageSetItemsToArray( |
-- const UnknownFieldSet& unknown_fields, |
-- uint8* target); |
-- |
-- // Compute the size of the UnknownFieldSet on the wire. |
-- static int ComputeUnknownFieldsSize(const UnknownFieldSet& unknown_fields); |
-- |
-- // Same thing except for messages that have the message_set_wire_format |
-- // option. |
-- static int ComputeUnknownMessageSetItemsSize( |
-- const UnknownFieldSet& unknown_fields); |
-- |
- |
- // Helper functions for encoding and decoding tags. (Inlined below and in |
- // _inl.h) |
-@@ -270,22 +213,6 @@ class LIBPROTOBUF_EXPORT WireFormat { |
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(WireFormat); |
- }; |
- |
--// Subclass of FieldSkipper which saves skipped fields to an UnknownFieldSet. |
--class LIBPROTOBUF_EXPORT UnknownFieldSetFieldSkipper : public FieldSkipper { |
-- public: |
-- UnknownFieldSetFieldSkipper(UnknownFieldSet* unknown_fields) |
-- : unknown_fields_(unknown_fields) {} |
-- virtual ~UnknownFieldSetFieldSkipper() {} |
-- |
-- // implements FieldSkipper ----------------------------------------- |
-- virtual bool SkipField(io::CodedInputStream* input, uint32 tag); |
-- virtual bool SkipMessage(io::CodedInputStream* input); |
-- virtual void SkipUnknownEnum(int field_number, int value); |
-- |
-- protected: |
-- UnknownFieldSet* unknown_fields_; |
--}; |
-- |
- // inline methods ==================================================== |
- |
- inline WireFormatLite::WireType WireFormat::WireTypeForField( |
-diff --git a/third_party/protobuf/src/google/protobuf/wire_format_lite.cc b/third_party/protobuf/src/google/protobuf/wire_format_lite.cc |
-index 2ce4920..58160c1f 100644 |
---- a/third_party/protobuf/src/google/protobuf/wire_format_lite.cc |
-+++ b/third_party/protobuf/src/google/protobuf/wire_format_lite.cc |
-@@ -55,6 +55,24 @@ const int WireFormatLite::kMessageSetMessageTag; |
- |
- #endif |
- |
-+// =================================================================== |
-+ |
-+bool FieldSkipper::SkipField( |
-+ io::CodedInputStream* input, uint32 tag) { |
-+ return WireFormatLite::SkipField(input, tag, unknown_fields_); |
-+} |
-+ |
-+bool FieldSkipper::SkipMessage(io::CodedInputStream* input) { |
-+ return WireFormatLite::SkipMessage(input, unknown_fields_); |
-+} |
-+ |
-+void FieldSkipper::SkipUnknownEnum( |
-+ int field_number, int value) { |
-+ unknown_fields_->AddVarint(field_number, value); |
-+} |
-+ |
-+// =================================================================== |
-+ |
- // IBM xlC requires prefixing constants with WireFormatLite:: |
- const int WireFormatLite::kMessageSetItemTagsSize = |
- io::CodedOutputStream::StaticVarintSize32< |
-@@ -113,28 +131,46 @@ WireFormatLite::kWireTypeForFieldType[MAX_FIELD_TYPE + 1] = { |
- WireFormatLite::WIRETYPE_VARINT, // TYPE_SINT64 |
- }; |
- |
--bool WireFormatLite::SkipField( |
-- io::CodedInputStream* input, uint32 tag) { |
-+bool WireFormatLite::SkipField(io::CodedInputStream* input, uint32 tag) { |
-+ return SkipField(input, tag, static_cast<UnknownFieldSet*>(NULL)); |
-+} |
-+ |
-+bool WireFormatLite::SkipField(io::CodedInputStream* input, uint32 tag, |
-+ UnknownFieldSet* unknown_fields) { |
-+ int number = WireFormatLite::GetTagFieldNumber(tag); |
-+ |
- switch (WireFormatLite::GetTagWireType(tag)) { |
- case WireFormatLite::WIRETYPE_VARINT: { |
- uint64 value; |
- if (!input->ReadVarint64(&value)) return false; |
-+ if (unknown_fields != NULL) unknown_fields->AddVarint(number, value); |
- return true; |
- } |
- case WireFormatLite::WIRETYPE_FIXED64: { |
- uint64 value; |
- if (!input->ReadLittleEndian64(&value)) return false; |
-+ if (unknown_fields != NULL) unknown_fields->AddFixed64(number, value); |
- return true; |
- } |
- case WireFormatLite::WIRETYPE_LENGTH_DELIMITED: { |
- uint32 length; |
- if (!input->ReadVarint32(&length)) return false; |
-- if (!input->Skip(length)) return false; |
-+ if (unknown_fields == NULL) { |
-+ if (!input->Skip(length)) return false; |
-+ } else { |
-+ if (!input->ReadString(unknown_fields->AddLengthDelimited(number), |
-+ length)) { |
-+ return false; |
-+ } |
-+ } |
- return true; |
- } |
- case WireFormatLite::WIRETYPE_START_GROUP: { |
- if (!input->IncrementRecursionDepth()) return false; |
-- if (!SkipMessage(input)) return false; |
-+ if (!SkipMessage(input, (unknown_fields == NULL) ? |
-+ NULL : unknown_fields->AddGroup(number))) { |
-+ return false; |
-+ } |
- input->DecrementRecursionDepth(); |
- // Check that the ending tag matched the starting tag. |
- if (!input->LastTagWas(WireFormatLite::MakeTag( |
-@@ -150,6 +186,7 @@ bool WireFormatLite::SkipField( |
- case WireFormatLite::WIRETYPE_FIXED32: { |
- uint32 value; |
- if (!input->ReadLittleEndian32(&value)) return false; |
-+ if (unknown_fields != NULL) unknown_fields->AddFixed32(number, value); |
- return true; |
- } |
- default: { |
-@@ -215,7 +252,8 @@ bool WireFormatLite::SkipField( |
- } |
- } |
- |
--bool WireFormatLite::SkipMessage(io::CodedInputStream* input) { |
-+bool WireFormatLite::SkipMessage(io::CodedInputStream* input, |
-+ UnknownFieldSet* unknown_fields) { |
- while (true) { |
- uint32 tag = input->ReadTag(); |
- if (tag == 0) { |
-@@ -230,7 +268,7 @@ bool WireFormatLite::SkipMessage(io::CodedInputStream* input) { |
- return true; |
- } |
- |
-- if (!SkipField(input, tag)) return false; |
-+ if (!SkipField(input, tag, unknown_fields)) return false; |
- } |
- } |
- |
-@@ -255,18 +293,231 @@ bool WireFormatLite::SkipMessage(io::CodedInputStream* input, |
- } |
- } |
- |
--bool FieldSkipper::SkipField( |
-- io::CodedInputStream* input, uint32 tag) { |
-- return WireFormatLite::SkipField(input, tag); |
-+bool WireFormatLite::ReadPackedEnumPreserveUnknowns( |
-+ io::CodedInputStream* input, |
-+ uint32 field_number, |
-+ bool (*is_valid)(int), |
-+ UnknownFieldSet* unknown_fields, |
-+ RepeatedField<int>* values) { |
-+ uint32 length; |
-+ if (!input->ReadVarint32(&length)) return false; |
-+ io::CodedInputStream::Limit limit = input->PushLimit(length); |
-+ while (input->BytesUntilLimit() > 0) { |
-+ int value; |
-+ if (!google::protobuf::internal::WireFormatLite::ReadPrimitive< |
-+ int, WireFormatLite::TYPE_ENUM>(input, &value)) { |
-+ return false; |
-+ } |
-+ if (is_valid == NULL || is_valid(value)) { |
-+ values->Add(value); |
-+ } else { |
-+ unknown_fields->AddVarint(field_number, value); |
-+ } |
-+ } |
-+ input->PopLimit(limit); |
-+ return true; |
- } |
- |
--bool FieldSkipper::SkipMessage(io::CodedInputStream* input) { |
-- return WireFormatLite::SkipMessage(input); |
-+ |
-+void WireFormatLite::SerializeUnknownFields( |
-+ const UnknownFieldSet& unknown_fields, |
-+ io::CodedOutputStream* output) { |
-+ for (int i = 0; i < unknown_fields.field_count(); i++) { |
-+ const UnknownField& field = unknown_fields.field(i); |
-+ switch (field.type()) { |
-+ case UnknownField::TYPE_VARINT: |
-+ output->WriteVarint32(WireFormatLite::MakeTag(field.number(), |
-+ WireFormatLite::WIRETYPE_VARINT)); |
-+ output->WriteVarint64(field.varint()); |
-+ break; |
-+ case UnknownField::TYPE_FIXED32: |
-+ output->WriteVarint32(WireFormatLite::MakeTag(field.number(), |
-+ WireFormatLite::WIRETYPE_FIXED32)); |
-+ output->WriteLittleEndian32(field.fixed32()); |
-+ break; |
-+ case UnknownField::TYPE_FIXED64: |
-+ output->WriteVarint32(WireFormatLite::MakeTag(field.number(), |
-+ WireFormatLite::WIRETYPE_FIXED64)); |
-+ output->WriteLittleEndian64(field.fixed64()); |
-+ break; |
-+ case UnknownField::TYPE_LENGTH_DELIMITED: |
-+ output->WriteVarint32(WireFormatLite::MakeTag(field.number(), |
-+ WireFormatLite::WIRETYPE_LENGTH_DELIMITED)); |
-+ output->WriteVarint32(field.length_delimited().size()); |
-+ output->WriteRawMaybeAliased(field.length_delimited().data(), |
-+ field.length_delimited().size()); |
-+ break; |
-+ case UnknownField::TYPE_GROUP: |
-+ output->WriteVarint32(WireFormatLite::MakeTag(field.number(), |
-+ WireFormatLite::WIRETYPE_START_GROUP)); |
-+ SerializeUnknownFields(field.group(), output); |
-+ output->WriteVarint32(WireFormatLite::MakeTag(field.number(), |
-+ WireFormatLite::WIRETYPE_END_GROUP)); |
-+ break; |
-+ } |
-+ } |
- } |
- |
--void FieldSkipper::SkipUnknownEnum( |
-- int /* field_number */, int /* value */) { |
-- // Nothing. |
-+uint8* WireFormatLite::SerializeUnknownFieldsToArray( |
-+ const UnknownFieldSet& unknown_fields, |
-+ uint8* target) { |
-+ for (int i = 0; i < unknown_fields.field_count(); i++) { |
-+ const UnknownField& field = unknown_fields.field(i); |
-+ |
-+ switch (field.type()) { |
-+ case UnknownField::TYPE_VARINT: |
-+ target = WireFormatLite::WriteInt64ToArray( |
-+ field.number(), field.varint(), target); |
-+ break; |
-+ case UnknownField::TYPE_FIXED32: |
-+ target = WireFormatLite::WriteFixed32ToArray( |
-+ field.number(), field.fixed32(), target); |
-+ break; |
-+ case UnknownField::TYPE_FIXED64: |
-+ target = WireFormatLite::WriteFixed64ToArray( |
-+ field.number(), field.fixed64(), target); |
-+ break; |
-+ case UnknownField::TYPE_LENGTH_DELIMITED: |
-+ target = WireFormatLite::WriteBytesToArray( |
-+ field.number(), field.length_delimited(), target); |
-+ break; |
-+ case UnknownField::TYPE_GROUP: |
-+ target = WireFormatLite::WriteTagToArray( |
-+ field.number(), WireFormatLite::WIRETYPE_START_GROUP, target); |
-+ target = SerializeUnknownFieldsToArray(field.group(), target); |
-+ target = WireFormatLite::WriteTagToArray( |
-+ field.number(), WireFormatLite::WIRETYPE_END_GROUP, target); |
-+ break; |
-+ } |
-+ } |
-+ return target; |
-+} |
-+ |
-+void WireFormatLite::SerializeUnknownMessageSetItems( |
-+ const UnknownFieldSet& unknown_fields, |
-+ io::CodedOutputStream* output) { |
-+ for (int i = 0; i < unknown_fields.field_count(); i++) { |
-+ const UnknownField& field = unknown_fields.field(i); |
-+ // The only unknown fields that are allowed to exist in a MessageSet are |
-+ // messages, which are length-delimited. |
-+ if (field.type() == UnknownField::TYPE_LENGTH_DELIMITED) { |
-+ // Start group. |
-+ output->WriteVarint32(WireFormatLite::kMessageSetItemStartTag); |
-+ |
-+ // Write type ID. |
-+ output->WriteVarint32(WireFormatLite::kMessageSetTypeIdTag); |
-+ output->WriteVarint32(field.number()); |
-+ |
-+ // Write message. |
-+ output->WriteVarint32(WireFormatLite::kMessageSetMessageTag); |
-+ field.SerializeLengthDelimitedNoTag(output); |
-+ |
-+ // End group. |
-+ output->WriteVarint32(WireFormatLite::kMessageSetItemEndTag); |
-+ } |
-+ } |
-+} |
-+ |
-+uint8* WireFormatLite::SerializeUnknownMessageSetItemsToArray( |
-+ const UnknownFieldSet& unknown_fields, |
-+ uint8* target) { |
-+ for (int i = 0; i < unknown_fields.field_count(); i++) { |
-+ const UnknownField& field = unknown_fields.field(i); |
-+ |
-+ // The only unknown fields that are allowed to exist in a MessageSet are |
-+ // messages, which are length-delimited. |
-+ if (field.type() == UnknownField::TYPE_LENGTH_DELIMITED) { |
-+ // Start group. |
-+ target = io::CodedOutputStream::WriteTagToArray( |
-+ WireFormatLite::kMessageSetItemStartTag, target); |
-+ |
-+ // Write type ID. |
-+ target = io::CodedOutputStream::WriteTagToArray( |
-+ WireFormatLite::kMessageSetTypeIdTag, target); |
-+ target = io::CodedOutputStream::WriteVarint32ToArray( |
-+ field.number(), target); |
-+ |
-+ // Write message. |
-+ target = io::CodedOutputStream::WriteTagToArray( |
-+ WireFormatLite::kMessageSetMessageTag, target); |
-+ target = field.SerializeLengthDelimitedNoTagToArray(target); |
-+ |
-+ // End group. |
-+ target = io::CodedOutputStream::WriteTagToArray( |
-+ WireFormatLite::kMessageSetItemEndTag, target); |
-+ } |
-+ } |
-+ |
-+ return target; |
-+} |
-+ |
-+int WireFormatLite::ComputeUnknownFieldsSize( |
-+ const UnknownFieldSet& unknown_fields) { |
-+ int size = 0; |
-+ for (int i = 0; i < unknown_fields.field_count(); i++) { |
-+ const UnknownField& field = unknown_fields.field(i); |
-+ |
-+ switch (field.type()) { |
-+ case UnknownField::TYPE_VARINT: |
-+ size += io::CodedOutputStream::VarintSize32( |
-+ WireFormatLite::MakeTag(field.number(), |
-+ WireFormatLite::WIRETYPE_VARINT)); |
-+ size += io::CodedOutputStream::VarintSize64(field.varint()); |
-+ break; |
-+ case UnknownField::TYPE_FIXED32: |
-+ size += io::CodedOutputStream::VarintSize32( |
-+ WireFormatLite::MakeTag(field.number(), |
-+ WireFormatLite::WIRETYPE_FIXED32)); |
-+ size += sizeof(int32); |
-+ break; |
-+ case UnknownField::TYPE_FIXED64: |
-+ size += io::CodedOutputStream::VarintSize32( |
-+ WireFormatLite::MakeTag(field.number(), |
-+ WireFormatLite::WIRETYPE_FIXED64)); |
-+ size += sizeof(int64); |
-+ break; |
-+ case UnknownField::TYPE_LENGTH_DELIMITED: |
-+ size += io::CodedOutputStream::VarintSize32( |
-+ WireFormatLite::MakeTag(field.number(), |
-+ WireFormatLite::WIRETYPE_LENGTH_DELIMITED)); |
-+ size += io::CodedOutputStream::VarintSize32( |
-+ field.length_delimited().size()); |
-+ size += field.length_delimited().size(); |
-+ break; |
-+ case UnknownField::TYPE_GROUP: |
-+ size += io::CodedOutputStream::VarintSize32( |
-+ WireFormatLite::MakeTag(field.number(), |
-+ WireFormatLite::WIRETYPE_START_GROUP)); |
-+ size += ComputeUnknownFieldsSize(field.group()); |
-+ size += io::CodedOutputStream::VarintSize32( |
-+ WireFormatLite::MakeTag(field.number(), |
-+ WireFormatLite::WIRETYPE_END_GROUP)); |
-+ break; |
-+ } |
-+ } |
-+ |
-+ return size; |
-+} |
-+ |
-+int WireFormatLite::ComputeUnknownMessageSetItemsSize( |
-+ const UnknownFieldSet& unknown_fields) { |
-+ int size = 0; |
-+ for (int i = 0; i < unknown_fields.field_count(); i++) { |
-+ const UnknownField& field = unknown_fields.field(i); |
-+ |
-+ // The only unknown fields that are allowed to exist in a MessageSet are |
-+ // messages, which are length-delimited. |
-+ if (field.type() == UnknownField::TYPE_LENGTH_DELIMITED) { |
-+ size += WireFormatLite::kMessageSetItemTagsSize; |
-+ size += io::CodedOutputStream::VarintSize32(field.number()); |
-+ |
-+ int field_size = field.GetLengthDelimitedSize(); |
-+ size += io::CodedOutputStream::VarintSize32(field_size); |
-+ size += field_size; |
-+ } |
-+ } |
-+ |
-+ return size; |
- } |
- |
- bool CodedOutputStreamFieldSkipper::SkipField( |
-diff --git a/third_party/protobuf/src/google/protobuf/wire_format_lite.h b/third_party/protobuf/src/google/protobuf/wire_format_lite.h |
-index ac83abd..9f922fd 100644 |
---- a/third_party/protobuf/src/google/protobuf/wire_format_lite.h |
-+++ b/third_party/protobuf/src/google/protobuf/wire_format_lite.h |
-@@ -44,11 +44,13 @@ |
- #include <google/protobuf/stubs/common.h> |
- #include <google/protobuf/message_lite.h> |
- #include <google/protobuf/io/coded_stream.h> // for CodedOutputStream::Varint32Size |
-+#include <google/protobuf/unknown_field_set.h> |
- |
- namespace google { |
- |
- namespace protobuf { |
- template <typename T> class RepeatedField; // repeated_field.h |
-+ class UnknownFieldSet; // unknown_field_set.h |
- } |
- |
- namespace protobuf { |
-@@ -157,21 +159,33 @@ class LIBPROTOBUF_EXPORT WireFormatLite { |
- // and end tags. |
- static inline int TagSize(int field_number, WireFormatLite::FieldType type); |
- |
-+ // ----------------------------------------------------------------- |
-+ // Helpers for dealing with unknown fields |
-+ |
- // Skips a field value with the given tag. The input should start |
- // positioned immediately after the tag. Skipped values are simply discarded, |
-- // not recorded anywhere. See WireFormat::SkipField() for a version that |
-- // records to an UnknownFieldSet. |
-+ // not recorded anywhere. |
- static bool SkipField(io::CodedInputStream* input, uint32 tag); |
- |
- // Skips a field value with the given tag. The input should start |
-+ // positioned immediately after the tag. If unknown_fields is non-NULL, |
-+ // the contents of the field will be added to it. |
-+ static bool SkipField(io::CodedInputStream* input, uint32 tag, |
-+ UnknownFieldSet* unknown_fields); |
-+ |
-+ // Skips a field value with the given tag. The input should start |
- // positioned immediately after the tag. Skipped values are recorded to a |
- // CodedOutputStream. |
- static bool SkipField(io::CodedInputStream* input, uint32 tag, |
- io::CodedOutputStream* output); |
- |
-- // Reads and ignores a message from the input. Skipped values are simply |
-- // discarded, not recorded anywhere. See WireFormat::SkipMessage() for a |
-- // version that records to an UnknownFieldSet. |
-+ // Reads and ignores a message from the input. If unknown_fields is non-NULL, |
-+ // the contents will be added to it. |
-+ static bool SkipMessage(io::CodedInputStream* input, |
-+ UnknownFieldSet* unknown_fields); |
-+ |
-+ // Reads and ignores a message from the input. Skipped values may be stored |
-+ // in the UnknownFieldSet if it exists. |
- static bool SkipMessage(io::CodedInputStream* input); |
- |
- // Reads and ignores a message from the input. Skipped values are recorded |
-@@ -233,6 +247,48 @@ class LIBPROTOBUF_EXPORT WireFormatLite { |
- static uint64 ZigZagEncode64(int64 n); |
- static int64 ZigZagDecode64(uint64 n); |
- |
-+ // Read a packed enum field. If the is_valid function is not NULL, values for |
-+ // which is_valid(value) returns false are appended to unknown_fields_stream. |
-+ static bool ReadPackedEnumPreserveUnknowns(io::CodedInputStream* input, |
-+ uint32 field_number, |
-+ bool (*is_valid)(int), |
-+ UnknownFieldSet* unknown_fields, |
-+ RepeatedField<int>* values); |
-+ |
-+ // Write the contents of an UnknownFieldSet to the output. |
-+ static void SerializeUnknownFields(const UnknownFieldSet& unknown_fields, |
-+ io::CodedOutputStream* output); |
-+ // Same as above, except writing directly to the provided buffer. |
-+ // Requires that the buffer have sufficient capacity for |
-+ // ComputeUnknownFieldsSize(unknown_fields). |
-+ // |
-+ // Returns a pointer past the last written byte. |
-+ static uint8* SerializeUnknownFieldsToArray( |
-+ const UnknownFieldSet& unknown_fields, |
-+ uint8* target); |
-+ |
-+ // Same thing except for messages that have the message_set_wire_format |
-+ // option. |
-+ static void SerializeUnknownMessageSetItems( |
-+ const UnknownFieldSet& unknown_fields, |
-+ io::CodedOutputStream* output); |
-+ // Same as above, except writing directly to the provided buffer. |
-+ // Requires that the buffer have sufficient capacity for |
-+ // ComputeUnknownMessageSetItemsSize(unknown_fields). |
-+ // |
-+ // Returns a pointer past the last written byte. |
-+ static uint8* SerializeUnknownMessageSetItemsToArray( |
-+ const UnknownFieldSet& unknown_fields, |
-+ uint8* target); |
-+ |
-+ // Compute the size of the UnknownFieldSet on the wire. |
-+ static int ComputeUnknownFieldsSize(const UnknownFieldSet& unknown_fields); |
-+ |
-+ // Same thing except for messages that have the message_set_wire_format |
-+ // option. |
-+ static int ComputeUnknownMessageSetItemsSize( |
-+ const UnknownFieldSet& unknown_fields); |
-+ |
- // ================================================================= |
- // Methods for reading/writing individual field. The implementations |
- // of these methods are defined in wire_format_lite_inl.h; you must #include |
-@@ -546,26 +602,26 @@ class LIBPROTOBUF_EXPORT WireFormatLite { |
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(WireFormatLite); |
- }; |
- |
--// A class which deals with unknown values. The default implementation just |
--// discards them. WireFormat defines a subclass which writes to an |
--// UnknownFieldSet. This class is used by ExtensionSet::ParseField(), since |
--// ExtensionSet is part of the lite library but UnknownFieldSet is not. |
-+// A class which deals with unknown values by saving them to an UnknownFieldSet. |
- class LIBPROTOBUF_EXPORT FieldSkipper { |
- public: |
-- FieldSkipper() {} |
-- virtual ~FieldSkipper() {} |
-+ FieldSkipper(UnknownFieldSet* unknown_fields) |
-+ : unknown_fields_(unknown_fields) {} |
- |
- // Skip a field whose tag has already been consumed. |
-- virtual bool SkipField(io::CodedInputStream* input, uint32 tag); |
-+ bool SkipField(io::CodedInputStream* input, uint32 tag); |
- |
- // Skip an entire message or group, up to an end-group tag (which is consumed) |
- // or end-of-stream. |
-- virtual bool SkipMessage(io::CodedInputStream* input); |
-+ bool SkipMessage(io::CodedInputStream* input); |
- |
- // Deal with an already-parsed unrecognized enum value. The default |
- // implementation does nothing, but the UnknownFieldSet-based implementation |
- // saves it as an unknown varint. |
-- virtual void SkipUnknownEnum(int field_number, int value); |
-+ void SkipUnknownEnum(int field_number, int value); |
-+ |
-+ private: |
-+ UnknownFieldSet* unknown_fields_; |
- }; |
- |
- // Subclass of FieldSkipper which saves skipped fields to a CodedOutputStream. |
-@@ -573,7 +629,7 @@ class LIBPROTOBUF_EXPORT FieldSkipper { |
- class LIBPROTOBUF_EXPORT CodedOutputStreamFieldSkipper : public FieldSkipper { |
- public: |
- explicit CodedOutputStreamFieldSkipper(io::CodedOutputStream* unknown_fields) |
-- : unknown_fields_(unknown_fields) {} |
-+ : FieldSkipper(nullptr), unknown_fields_(unknown_fields) {} |
- virtual ~CodedOutputStreamFieldSkipper() {} |
- |
- // implements FieldSkipper ----------------------------------------- |