diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/any.pb.cc | 14 | ||||
-rw-r--r-- | src/google/protobuf/api.pb.cc | 178 | ||||
-rw-r--r-- | src/google/protobuf/api.pb.h | 56 | ||||
-rw-r--r-- | src/google/protobuf/compiler/plugin.pb.cc | 8 | ||||
-rw-r--r-- | src/google/protobuf/descriptor.pb.cc | 24 | ||||
-rw-r--r-- | src/google/protobuf/field_mask.pb.cc | 18 | ||||
-rw-r--r-- | src/google/protobuf/source_context.pb.cc | 14 | ||||
-rw-r--r-- | src/google/protobuf/struct.pb.cc | 67 | ||||
-rw-r--r-- | src/google/protobuf/struct.pb.h | 30 | ||||
-rw-r--r-- | src/google/protobuf/type.pb.cc | 248 | ||||
-rw-r--r-- | src/google/protobuf/type.pb.h | 88 | ||||
-rw-r--r-- | src/google/protobuf/util/field_comparator_test.cc | 2 | ||||
-rw-r--r-- | src/google/protobuf/util/internal/utility.cc | 13 | ||||
-rw-r--r-- | src/google/protobuf/wrappers.pb.cc | 14 | ||||
-rw-r--r-- | src/google/protobuf/wrappers.pb.h | 10 |
15 files changed, 398 insertions, 386 deletions
diff --git a/src/google/protobuf/any.pb.cc b/src/google/protobuf/any.pb.cc index c2e58131..cbb5d233 100644 --- a/src/google/protobuf/any.pb.cc +++ b/src/google/protobuf/any.pb.cc @@ -208,10 +208,10 @@ bool Any::MergePartialFromCodedStream( if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_type_url())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->type_url().data(), this->type_url().length(), - ::google::protobuf::internal::WireFormat::PARSE, - "google.protobuf.Any.type_url"); + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.Any.type_url")); } else { goto handle_unusual; } @@ -258,9 +258,9 @@ void Any::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_start:google.protobuf.Any) // optional string type_url = 1; if (this->type_url().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->type_url().data(), this->type_url().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Any.type_url"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->type_url(), output); @@ -280,9 +280,9 @@ void Any::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Any) // optional string type_url = 1; if (this->type_url().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->type_url().data(), this->type_url().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Any.type_url"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( diff --git a/src/google/protobuf/api.pb.cc b/src/google/protobuf/api.pb.cc index 671eaca7..0a2c4ec0 100644 --- a/src/google/protobuf/api.pb.cc +++ b/src/google/protobuf/api.pb.cc @@ -289,10 +289,10 @@ bool Api::MergePartialFromCodedStream( if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::PARSE, - "google.protobuf.Api.name"); + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.Api.name")); } else { goto handle_unusual; } @@ -339,10 +339,10 @@ bool Api::MergePartialFromCodedStream( parse_version: DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_version())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->version().data(), this->version().length(), - ::google::protobuf::internal::WireFormat::PARSE, - "google.protobuf.Api.version"); + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.Api.version")); } else { goto handle_unusual; } @@ -422,9 +422,9 @@ void Api::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_start:google.protobuf.Api) // optional string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Api.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); @@ -444,9 +444,9 @@ void Api::SerializeWithCachedSizes( // optional string version = 4; if (this->version().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->version().data(), this->version().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Api.version"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->version(), output); @@ -478,9 +478,9 @@ void Api::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Api) // optional string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Api.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( @@ -503,9 +503,9 @@ void Api::SerializeWithCachedSizes( // optional string version = 4; if (this->version().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->version().data(), this->version().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Api.version"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( @@ -723,28 +723,28 @@ int Api::methods_size() const { void Api::clear_methods() { methods_.Clear(); } - const ::google::protobuf::Method& Api::methods(int index) const { +const ::google::protobuf::Method& Api::methods(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Api.methods) return methods_.Get(index); } - ::google::protobuf::Method* Api::mutable_methods(int index) { +::google::protobuf::Method* Api::mutable_methods(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Api.methods) return methods_.Mutable(index); } - ::google::protobuf::Method* Api::add_methods() { +::google::protobuf::Method* Api::add_methods() { // @@protoc_insertion_point(field_add:google.protobuf.Api.methods) return methods_.Add(); } - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >& -Api::methods() const { - // @@protoc_insertion_point(field_list:google.protobuf.Api.methods) - return methods_; -} - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >* +::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >* Api::mutable_methods() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.methods) return &methods_; } +const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >& +Api::methods() const { + // @@protoc_insertion_point(field_list:google.protobuf.Api.methods) + return methods_; +} // repeated .google.protobuf.Option options = 3; int Api::options_size() const { @@ -753,28 +753,28 @@ int Api::options_size() const { void Api::clear_options() { options_.Clear(); } - const ::google::protobuf::Option& Api::options(int index) const { +const ::google::protobuf::Option& Api::options(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Api.options) return options_.Get(index); } - ::google::protobuf::Option* Api::mutable_options(int index) { +::google::protobuf::Option* Api::mutable_options(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Api.options) return options_.Mutable(index); } - ::google::protobuf::Option* Api::add_options() { +::google::protobuf::Option* Api::add_options() { // @@protoc_insertion_point(field_add:google.protobuf.Api.options) return options_.Add(); } - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& -Api::options() const { - // @@protoc_insertion_point(field_list:google.protobuf.Api.options) - return options_; -} - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* +::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* Api::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.options) return &options_; } +const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& +Api::options() const { + // @@protoc_insertion_point(field_list:google.protobuf.Api.options) + return options_; +} // optional string version = 4; void Api::clear_version() { @@ -827,11 +827,11 @@ void Api::clear_source_context() { if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_; source_context_ = NULL; } - const ::google::protobuf::SourceContext& Api::source_context() const { +const ::google::protobuf::SourceContext& Api::source_context() const { // @@protoc_insertion_point(field_get:google.protobuf.Api.source_context) return source_context_ != NULL ? *source_context_ : *default_instance_->source_context_; } - ::google::protobuf::SourceContext* Api::mutable_source_context() { +::google::protobuf::SourceContext* Api::mutable_source_context() { if (source_context_ == NULL) { source_context_ = new ::google::protobuf::SourceContext; @@ -839,13 +839,13 @@ void Api::clear_source_context() { // @@protoc_insertion_point(field_mutable:google.protobuf.Api.source_context) return source_context_; } - ::google::protobuf::SourceContext* Api::release_source_context() { +::google::protobuf::SourceContext* Api::release_source_context() { ::google::protobuf::SourceContext* temp = source_context_; source_context_ = NULL; return temp; } - void Api::set_allocated_source_context(::google::protobuf::SourceContext* source_context) { +void Api::set_allocated_source_context(::google::protobuf::SourceContext* source_context) { delete source_context_; source_context_ = source_context; if (source_context) { @@ -863,28 +863,28 @@ int Api::mixins_size() const { void Api::clear_mixins() { mixins_.Clear(); } - const ::google::protobuf::Mixin& Api::mixins(int index) const { +const ::google::protobuf::Mixin& Api::mixins(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Api.mixins) return mixins_.Get(index); } - ::google::protobuf::Mixin* Api::mutable_mixins(int index) { +::google::protobuf::Mixin* Api::mutable_mixins(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Api.mixins) return mixins_.Mutable(index); } - ::google::protobuf::Mixin* Api::add_mixins() { +::google::protobuf::Mixin* Api::add_mixins() { // @@protoc_insertion_point(field_add:google.protobuf.Api.mixins) return mixins_.Add(); } - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >& -Api::mixins() const { - // @@protoc_insertion_point(field_list:google.protobuf.Api.mixins) - return mixins_; -} - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >* +::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >* Api::mutable_mixins() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.mixins) return &mixins_; } +const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >& +Api::mixins() const { + // @@protoc_insertion_point(field_list:google.protobuf.Api.mixins) + return mixins_; +} // optional .google.protobuf.Syntax syntax = 7; void Api::clear_syntax() { @@ -1017,10 +1017,10 @@ bool Method::MergePartialFromCodedStream( if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::PARSE, - "google.protobuf.Method.name"); + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.Method.name")); } else { goto handle_unusual; } @@ -1034,10 +1034,10 @@ bool Method::MergePartialFromCodedStream( parse_request_type_url: DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_request_type_url())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->request_type_url().data(), this->request_type_url().length(), - ::google::protobuf::internal::WireFormat::PARSE, - "google.protobuf.Method.request_type_url"); + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.Method.request_type_url")); } else { goto handle_unusual; } @@ -1066,10 +1066,10 @@ bool Method::MergePartialFromCodedStream( parse_response_type_url: DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_response_type_url())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->response_type_url().data(), this->response_type_url().length(), - ::google::protobuf::internal::WireFormat::PARSE, - "google.protobuf.Method.response_type_url"); + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.Method.response_type_url")); } else { goto handle_unusual; } @@ -1151,9 +1151,9 @@ void Method::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_start:google.protobuf.Method) // optional string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); @@ -1161,9 +1161,9 @@ void Method::SerializeWithCachedSizes( // optional string request_type_url = 2; if (this->request_type_url().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->request_type_url().data(), this->request_type_url().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.request_type_url"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->request_type_url(), output); @@ -1176,9 +1176,9 @@ void Method::SerializeWithCachedSizes( // optional string response_type_url = 4; if (this->response_type_url().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->response_type_url().data(), this->response_type_url().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.response_type_url"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->response_type_url(), output); @@ -1209,9 +1209,9 @@ void Method::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Method) // optional string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( @@ -1220,9 +1220,9 @@ void Method::SerializeWithCachedSizes( // optional string request_type_url = 2; if (this->request_type_url().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->request_type_url().data(), this->request_type_url().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.request_type_url"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( @@ -1236,9 +1236,9 @@ void Method::SerializeWithCachedSizes( // optional string response_type_url = 4; if (this->response_type_url().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->response_type_url().data(), this->response_type_url().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.response_type_url"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( @@ -1567,28 +1567,28 @@ int Method::options_size() const { void Method::clear_options() { options_.Clear(); } - const ::google::protobuf::Option& Method::options(int index) const { +const ::google::protobuf::Option& Method::options(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Method.options) return options_.Get(index); } - ::google::protobuf::Option* Method::mutable_options(int index) { +::google::protobuf::Option* Method::mutable_options(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Method.options) return options_.Mutable(index); } - ::google::protobuf::Option* Method::add_options() { +::google::protobuf::Option* Method::add_options() { // @@protoc_insertion_point(field_add:google.protobuf.Method.options) return options_.Add(); } - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& -Method::options() const { - // @@protoc_insertion_point(field_list:google.protobuf.Method.options) - return options_; -} - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* +::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* Method::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Method.options) return &options_; } +const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& +Method::options() const { + // @@protoc_insertion_point(field_list:google.protobuf.Method.options) + return options_; +} // optional .google.protobuf.Syntax syntax = 7; void Method::clear_syntax() { @@ -1696,10 +1696,10 @@ bool Mixin::MergePartialFromCodedStream( if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::PARSE, - "google.protobuf.Mixin.name"); + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.Mixin.name")); } else { goto handle_unusual; } @@ -1713,10 +1713,10 @@ bool Mixin::MergePartialFromCodedStream( parse_root: DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_root())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->root().data(), this->root().length(), - ::google::protobuf::internal::WireFormat::PARSE, - "google.protobuf.Mixin.root"); + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.Mixin.root")); } else { goto handle_unusual; } @@ -1750,9 +1750,9 @@ void Mixin::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_start:google.protobuf.Mixin) // optional string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Mixin.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); @@ -1760,9 +1760,9 @@ void Mixin::SerializeWithCachedSizes( // optional string root = 2; if (this->root().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->root().data(), this->root().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Mixin.root"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->root(), output); @@ -1776,9 +1776,9 @@ void Mixin::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Mixin) // optional string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Mixin.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( @@ -1787,9 +1787,9 @@ void Mixin::SerializeWithCachedSizes( // optional string root = 2; if (this->root().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->root().data(), this->root().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Mixin.root"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h index 414734a9..3c5a6f31 100644 --- a/src/google/protobuf/api.pb.h +++ b/src/google/protobuf/api.pb.h @@ -119,10 +119,10 @@ class LIBPROTOBUF_EXPORT Api : public ::google::protobuf::Message { const ::google::protobuf::Method& methods(int index) const; ::google::protobuf::Method* mutable_methods(int index); ::google::protobuf::Method* add_methods(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >& - methods() const; ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >* mutable_methods(); + const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >& + methods() const; // repeated .google.protobuf.Option options = 3; int options_size() const; @@ -131,10 +131,10 @@ class LIBPROTOBUF_EXPORT Api : public ::google::protobuf::Message { const ::google::protobuf::Option& options(int index) const; ::google::protobuf::Option* mutable_options(int index); ::google::protobuf::Option* add_options(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& - options() const; ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* mutable_options(); + const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& + options() const; // optional string version = 4; void clear_version(); @@ -163,10 +163,10 @@ class LIBPROTOBUF_EXPORT Api : public ::google::protobuf::Message { const ::google::protobuf::Mixin& mixins(int index) const; ::google::protobuf::Mixin* mutable_mixins(int index); ::google::protobuf::Mixin* add_mixins(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >& - mixins() const; ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >* mutable_mixins(); + const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >& + mixins() const; // optional .google.protobuf.Syntax syntax = 7; void clear_syntax(); @@ -304,10 +304,10 @@ class LIBPROTOBUF_EXPORT Method : public ::google::protobuf::Message { const ::google::protobuf::Option& options(int index) const; ::google::protobuf::Option* mutable_options(int index); ::google::protobuf::Option* add_options(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& - options() const; ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* mutable_options(); + const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& + options() const; // optional .google.protobuf.Syntax syntax = 7; void clear_syntax(); @@ -500,16 +500,16 @@ inline ::google::protobuf::Method* Api::add_methods() { // @@protoc_insertion_point(field_add:google.protobuf.Api.methods) return methods_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >& -Api::methods() const { - // @@protoc_insertion_point(field_list:google.protobuf.Api.methods) - return methods_; -} inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >* Api::mutable_methods() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.methods) return &methods_; } +inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >& +Api::methods() const { + // @@protoc_insertion_point(field_list:google.protobuf.Api.methods) + return methods_; +} // repeated .google.protobuf.Option options = 3; inline int Api::options_size() const { @@ -530,16 +530,16 @@ inline ::google::protobuf::Option* Api::add_options() { // @@protoc_insertion_point(field_add:google.protobuf.Api.options) return options_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& -Api::options() const { - // @@protoc_insertion_point(field_list:google.protobuf.Api.options) - return options_; -} inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* Api::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.options) return &options_; } +inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& +Api::options() const { + // @@protoc_insertion_point(field_list:google.protobuf.Api.options) + return options_; +} // optional string version = 4; inline void Api::clear_version() { @@ -640,16 +640,16 @@ inline ::google::protobuf::Mixin* Api::add_mixins() { // @@protoc_insertion_point(field_add:google.protobuf.Api.mixins) return mixins_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >& -Api::mixins() const { - // @@protoc_insertion_point(field_list:google.protobuf.Api.mixins) - return mixins_; -} inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >* Api::mutable_mixins() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.mixins) return &mixins_; } +inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >& +Api::mixins() const { + // @@protoc_insertion_point(field_list:google.protobuf.Api.mixins) + return mixins_; +} // optional .google.protobuf.Syntax syntax = 7; inline void Api::clear_syntax() { @@ -845,16 +845,16 @@ inline ::google::protobuf::Option* Method::add_options() { // @@protoc_insertion_point(field_add:google.protobuf.Method.options) return options_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& -Method::options() const { - // @@protoc_insertion_point(field_list:google.protobuf.Method.options) - return options_; -} inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* Method::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Method.options) return &options_; } +inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& +Method::options() const { + // @@protoc_insertion_point(field_list:google.protobuf.Method.options) + return options_; +} // optional .google.protobuf.Syntax syntax = 7; inline void Method::clear_syntax() { diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc index 994bc392..0792d875 100644 --- a/src/google/protobuf/compiler/plugin.pb.cc +++ b/src/google/protobuf/compiler/plugin.pb.cc @@ -340,10 +340,10 @@ void CodeGeneratorRequest::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.CodeGeneratorRequest) // repeated string file_to_generate = 1; for (int i = 0; i < this->file_to_generate_size(); i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->file_to_generate(i).data(), this->file_to_generate(i).length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate"); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->file_to_generate(i).data(), this->file_to_generate(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate"); ::google::protobuf::internal::WireFormatLite::WriteString( 1, this->file_to_generate(i), output); } diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc index 6f9905aa..fe23c0ab 100644 --- a/src/google/protobuf/descriptor.pb.cc +++ b/src/google/protobuf/descriptor.pb.cc @@ -1466,10 +1466,10 @@ void FileDescriptorProto::SerializeWithCachedSizes( // repeated string dependency = 3; for (int i = 0; i < this->dependency_size(); i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->dependency(i).data(), this->dependency(i).length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FileDescriptorProto.dependency"); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->dependency(i).data(), this->dependency(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FileDescriptorProto.dependency"); ::google::protobuf::internal::WireFormatLite::WriteString( 3, this->dependency(i), output); } @@ -3269,10 +3269,10 @@ void DescriptorProto::SerializeWithCachedSizes( // repeated string reserved_name = 10; for (int i = 0; i < this->reserved_name_size(); i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->reserved_name(i).data(), this->reserved_name(i).length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.DescriptorProto.reserved_name"); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->reserved_name(i).data(), this->reserved_name(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.DescriptorProto.reserved_name"); ::google::protobuf::internal::WireFormatLite::WriteString( 10, this->reserved_name(i), output); } @@ -13221,10 +13221,10 @@ void SourceCodeInfo_Location::SerializeWithCachedSizes( // repeated string leading_detached_comments = 6; for (int i = 0; i < this->leading_detached_comments_size(); i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->leading_detached_comments(i).data(), this->leading_detached_comments(i).length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->leading_detached_comments(i).data(), this->leading_detached_comments(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); ::google::protobuf::internal::WireFormatLite::WriteString( 6, this->leading_detached_comments(i), output); } diff --git a/src/google/protobuf/field_mask.pb.cc b/src/google/protobuf/field_mask.pb.cc index 0537057d..d8f4ee91 100644 --- a/src/google/protobuf/field_mask.pb.cc +++ b/src/google/protobuf/field_mask.pb.cc @@ -193,11 +193,11 @@ bool FieldMask::MergePartialFromCodedStream( parse_paths: DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_paths())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->paths(this->paths_size() - 1).data(), this->paths(this->paths_size() - 1).length(), - ::google::protobuf::internal::WireFormat::PARSE, - "google.protobuf.FieldMask.paths"); + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.FieldMask.paths")); } else { goto handle_unusual; } @@ -232,10 +232,10 @@ void FieldMask::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_start:google.protobuf.FieldMask) // repeated string paths = 1; for (int i = 0; i < this->paths_size(); i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->paths(i).data(), this->paths(i).length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FieldMask.paths"); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->paths(i).data(), this->paths(i).length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.protobuf.FieldMask.paths"); ::google::protobuf::internal::WireFormatLite::WriteString( 1, this->paths(i), output); } @@ -248,9 +248,9 @@ void FieldMask::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldMask) // repeated string paths = 1; for (int i = 0; i < this->paths_size(); i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->paths(i).data(), this->paths(i).length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.FieldMask.paths"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(1, this->paths(i), target); diff --git a/src/google/protobuf/source_context.pb.cc b/src/google/protobuf/source_context.pb.cc index 3369e477..c8397639 100644 --- a/src/google/protobuf/source_context.pb.cc +++ b/src/google/protobuf/source_context.pb.cc @@ -194,10 +194,10 @@ bool SourceContext::MergePartialFromCodedStream( if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_file_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->file_name().data(), this->file_name().length(), - ::google::protobuf::internal::WireFormat::PARSE, - "google.protobuf.SourceContext.file_name"); + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.SourceContext.file_name")); } else { goto handle_unusual; } @@ -231,9 +231,9 @@ void SourceContext::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_start:google.protobuf.SourceContext) // optional string file_name = 1; if (this->file_name().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->file_name().data(), this->file_name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.SourceContext.file_name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->file_name(), output); @@ -247,9 +247,9 @@ void SourceContext::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceContext) // optional string file_name = 1; if (this->file_name().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->file_name().data(), this->file_name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.SourceContext.file_name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( diff --git a/src/google/protobuf/struct.pb.cc b/src/google/protobuf/struct.pb.cc index a7e2eafd..c2b27c4c 100644 --- a/src/google/protobuf/struct.pb.cc +++ b/src/google/protobuf/struct.pb.cc @@ -301,6 +301,10 @@ bool Struct::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, entry.get())); (*mutable_fields())[entry->key()].Swap(entry->mutable_value()); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + entry->key().data(), entry->key().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.Struct.FieldsEntry.key")); } else { goto handle_unusual; } @@ -343,6 +347,10 @@ void Struct::SerializeWithCachedSizes( entry.reset(fields_.NewEntryWrapper(it->first, it->second)); ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, *entry, output); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + it->first.data(), it->first.length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.protobuf.Struct.FieldsEntry.key"); } } @@ -362,6 +370,10 @@ void Struct::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormatLite:: WriteMessageNoVirtualToArray( 1, *entry, target); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + it->first.data(), it->first.length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.protobuf.Struct.FieldsEntry.key"); } } @@ -547,6 +559,7 @@ Value* Value::New(::google::protobuf::Arena* arena) const { } void Value::clear_kind() { + typedef Value T; switch(kind_case()) { case kNullValue: { // No need to clear @@ -631,10 +644,10 @@ bool Value::MergePartialFromCodedStream( parse_string_value: DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_string_value())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->string_value().data(), this->string_value().length(), - ::google::protobuf::internal::WireFormat::PARSE, - "google.protobuf.Value.string_value"); + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.Value.string_value")); } else { goto handle_unusual; } @@ -721,9 +734,9 @@ void Value::SerializeWithCachedSizes( // optional string string_value = 3; if (has_string_value()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->string_value().data(), this->string_value().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Value.string_value"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->string_value(), output); @@ -765,9 +778,9 @@ void Value::SerializeWithCachedSizes( // optional string string_value = 3; if (has_string_value()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->string_value().data(), this->string_value().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Value.string_value"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( @@ -1114,10 +1127,11 @@ void Value::clear_struct_value() { } const ::google::protobuf::Struct& Value::struct_value() const { // @@protoc_insertion_point(field_get:google.protobuf.Value.struct_value) - return has_struct_value() ? *kind_.struct_value_ - : ::google::protobuf::Struct::default_instance(); + return has_struct_value() + ? *kind_.struct_value_ + : ::google::protobuf::Struct::default_instance(); } - ::google::protobuf::Struct* Value::mutable_struct_value() { +::google::protobuf::Struct* Value::mutable_struct_value() { if (!has_struct_value()) { clear_kind(); set_has_struct_value(); @@ -1126,7 +1140,7 @@ void Value::clear_struct_value() { // @@protoc_insertion_point(field_mutable:google.protobuf.Value.struct_value) return kind_.struct_value_; } - ::google::protobuf::Struct* Value::release_struct_value() { +::google::protobuf::Struct* Value::release_struct_value() { if (has_struct_value()) { clear_has_kind(); ::google::protobuf::Struct* temp = kind_.struct_value_; @@ -1136,7 +1150,7 @@ void Value::clear_struct_value() { return NULL; } } - void Value::set_allocated_struct_value(::google::protobuf::Struct* struct_value) { +void Value::set_allocated_struct_value(::google::protobuf::Struct* struct_value) { clear_kind(); if (struct_value) { set_has_struct_value(); @@ -1160,10 +1174,11 @@ void Value::clear_list_value() { } const ::google::protobuf::ListValue& Value::list_value() const { // @@protoc_insertion_point(field_get:google.protobuf.Value.list_value) - return has_list_value() ? *kind_.list_value_ - : ::google::protobuf::ListValue::default_instance(); + return has_list_value() + ? *kind_.list_value_ + : ::google::protobuf::ListValue::default_instance(); } - ::google::protobuf::ListValue* Value::mutable_list_value() { +::google::protobuf::ListValue* Value::mutable_list_value() { if (!has_list_value()) { clear_kind(); set_has_list_value(); @@ -1172,7 +1187,7 @@ void Value::clear_list_value() { // @@protoc_insertion_point(field_mutable:google.protobuf.Value.list_value) return kind_.list_value_; } - ::google::protobuf::ListValue* Value::release_list_value() { +::google::protobuf::ListValue* Value::release_list_value() { if (has_list_value()) { clear_has_kind(); ::google::protobuf::ListValue* temp = kind_.list_value_; @@ -1182,7 +1197,7 @@ void Value::clear_list_value() { return NULL; } } - void Value::set_allocated_list_value(::google::protobuf::ListValue* list_value) { +void Value::set_allocated_list_value(::google::protobuf::ListValue* list_value) { clear_kind(); if (list_value) { set_has_list_value(); @@ -1422,28 +1437,28 @@ int ListValue::values_size() const { void ListValue::clear_values() { values_.Clear(); } - const ::google::protobuf::Value& ListValue::values(int index) const { +const ::google::protobuf::Value& ListValue::values(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.ListValue.values) return values_.Get(index); } - ::google::protobuf::Value* ListValue::mutable_values(int index) { +::google::protobuf::Value* ListValue::mutable_values(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.ListValue.values) return values_.Mutable(index); } - ::google::protobuf::Value* ListValue::add_values() { +::google::protobuf::Value* ListValue::add_values() { // @@protoc_insertion_point(field_add:google.protobuf.ListValue.values) return values_.Add(); } - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >& -ListValue::values() const { - // @@protoc_insertion_point(field_list:google.protobuf.ListValue.values) - return values_; -} - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >* +::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >* ListValue::mutable_values() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.ListValue.values) return &values_; } +const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >& +ListValue::values() const { + // @@protoc_insertion_point(field_list:google.protobuf.ListValue.values) + return values_; +} #endif // PROTOBUF_INLINE_NOT_IN_HEADERS diff --git a/src/google/protobuf/struct.pb.h b/src/google/protobuf/struct.pb.h index 2889c8fe..0527c812 100644 --- a/src/google/protobuf/struct.pb.h +++ b/src/google/protobuf/struct.pb.h @@ -40,9 +40,9 @@ void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto(); void protobuf_AssignDesc_google_2fprotobuf_2fstruct_2eproto(); void protobuf_ShutdownFile_google_2fprotobuf_2fstruct_2eproto(); +class ListValue; class Struct; class Value; -class ListValue; enum NullValue { NULL_VALUE = 0, @@ -383,10 +383,10 @@ class LIBPROTOBUF_EXPORT ListValue : public ::google::protobuf::Message { const ::google::protobuf::Value& values(int index) const; ::google::protobuf::Value* mutable_values(int index); ::google::protobuf::Value* add_values(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >& - values() const; ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >* mutable_values(); + const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >& + values() const; // @@protoc_insertion_point(class_scope:google.protobuf.ListValue) private: @@ -612,10 +612,11 @@ inline void Value::clear_struct_value() { clear_has_kind(); } } -inline const ::google::protobuf::Struct& Value::struct_value() const { +inline const ::google::protobuf::Struct& Value::struct_value() const { // @@protoc_insertion_point(field_get:google.protobuf.Value.struct_value) - return has_struct_value() ? *kind_.struct_value_ - : ::google::protobuf::Struct::default_instance(); + return has_struct_value() + ? *kind_.struct_value_ + : ::google::protobuf::Struct::default_instance(); } inline ::google::protobuf::Struct* Value::mutable_struct_value() { if (!has_struct_value()) { @@ -658,10 +659,11 @@ inline void Value::clear_list_value() { clear_has_kind(); } } -inline const ::google::protobuf::ListValue& Value::list_value() const { +inline const ::google::protobuf::ListValue& Value::list_value() const { // @@protoc_insertion_point(field_get:google.protobuf.Value.list_value) - return has_list_value() ? *kind_.list_value_ - : ::google::protobuf::ListValue::default_instance(); + return has_list_value() + ? *kind_.list_value_ + : ::google::protobuf::ListValue::default_instance(); } inline ::google::protobuf::ListValue* Value::mutable_list_value() { if (!has_list_value()) { @@ -723,16 +725,16 @@ inline ::google::protobuf::Value* ListValue::add_values() { // @@protoc_insertion_point(field_add:google.protobuf.ListValue.values) return values_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >& -ListValue::values() const { - // @@protoc_insertion_point(field_list:google.protobuf.ListValue.values) - return values_; -} inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >* ListValue::mutable_values() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.ListValue.values) return &values_; } +inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >& +ListValue::values() const { + // @@protoc_insertion_point(field_list:google.protobuf.ListValue.values) + return values_; +} #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // ------------------------------------------------------------------- diff --git a/src/google/protobuf/type.pb.cc b/src/google/protobuf/type.pb.cc index 395553c6..8f993561 100644 --- a/src/google/protobuf/type.pb.cc +++ b/src/google/protobuf/type.pb.cc @@ -381,10 +381,10 @@ bool Type::MergePartialFromCodedStream( if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::PARSE, - "google.protobuf.Type.name"); + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.Type.name")); } else { goto handle_unusual; } @@ -415,11 +415,11 @@ bool Type::MergePartialFromCodedStream( parse_oneofs: DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_oneofs())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->oneofs(this->oneofs_size() - 1).data(), this->oneofs(this->oneofs_size() - 1).length(), - ::google::protobuf::internal::WireFormat::PARSE, - "google.protobuf.Type.oneofs"); + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.Type.oneofs")); } else { goto handle_unusual; } @@ -500,9 +500,9 @@ void Type::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_start:google.protobuf.Type) // optional string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Type.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); @@ -516,10 +516,10 @@ void Type::SerializeWithCachedSizes( // repeated string oneofs = 3; for (int i = 0; i < this->oneofs_size(); i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( - this->oneofs(i).data(), this->oneofs(i).length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.Type.oneofs"); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->oneofs(i).data(), this->oneofs(i).length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.protobuf.Type.oneofs"); ::google::protobuf::internal::WireFormatLite::WriteString( 3, this->oneofs(i), output); } @@ -550,9 +550,9 @@ void Type::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Type) // optional string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Type.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( @@ -568,9 +568,9 @@ void Type::SerializeWithCachedSizes( // repeated string oneofs = 3; for (int i = 0; i < this->oneofs_size(); i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->oneofs(i).data(), this->oneofs(i).length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Type.oneofs"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(3, this->oneofs(i), target); @@ -774,28 +774,28 @@ int Type::fields_size() const { void Type::clear_fields() { fields_.Clear(); } - const ::google::protobuf::Field& Type::fields(int index) const { +const ::google::protobuf::Field& Type::fields(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Type.fields) return fields_.Get(index); } - ::google::protobuf::Field* Type::mutable_fields(int index) { +::google::protobuf::Field* Type::mutable_fields(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Type.fields) return fields_.Mutable(index); } - ::google::protobuf::Field* Type::add_fields() { +::google::protobuf::Field* Type::add_fields() { // @@protoc_insertion_point(field_add:google.protobuf.Type.fields) return fields_.Add(); } - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >& -Type::fields() const { - // @@protoc_insertion_point(field_list:google.protobuf.Type.fields) - return fields_; -} - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >* +::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >* Type::mutable_fields() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.fields) return &fields_; } +const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >& +Type::fields() const { + // @@protoc_insertion_point(field_list:google.protobuf.Type.fields) + return fields_; +} // repeated string oneofs = 3; int Type::oneofs_size() const { @@ -858,28 +858,28 @@ int Type::options_size() const { void Type::clear_options() { options_.Clear(); } - const ::google::protobuf::Option& Type::options(int index) const { +const ::google::protobuf::Option& Type::options(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Type.options) return options_.Get(index); } - ::google::protobuf::Option* Type::mutable_options(int index) { +::google::protobuf::Option* Type::mutable_options(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Type.options) return options_.Mutable(index); } - ::google::protobuf::Option* Type::add_options() { +::google::protobuf::Option* Type::add_options() { // @@protoc_insertion_point(field_add:google.protobuf.Type.options) return options_.Add(); } - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& -Type::options() const { - // @@protoc_insertion_point(field_list:google.protobuf.Type.options) - return options_; -} - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* +::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* Type::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.options) return &options_; } +const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& +Type::options() const { + // @@protoc_insertion_point(field_list:google.protobuf.Type.options) + return options_; +} // optional .google.protobuf.SourceContext source_context = 5; bool Type::has_source_context() const { @@ -889,11 +889,11 @@ void Type::clear_source_context() { if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_; source_context_ = NULL; } - const ::google::protobuf::SourceContext& Type::source_context() const { +const ::google::protobuf::SourceContext& Type::source_context() const { // @@protoc_insertion_point(field_get:google.protobuf.Type.source_context) return source_context_ != NULL ? *source_context_ : *default_instance_->source_context_; } - ::google::protobuf::SourceContext* Type::mutable_source_context() { +::google::protobuf::SourceContext* Type::mutable_source_context() { if (source_context_ == NULL) { source_context_ = new ::google::protobuf::SourceContext; @@ -901,13 +901,13 @@ void Type::clear_source_context() { // @@protoc_insertion_point(field_mutable:google.protobuf.Type.source_context) return source_context_; } - ::google::protobuf::SourceContext* Type::release_source_context() { +::google::protobuf::SourceContext* Type::release_source_context() { ::google::protobuf::SourceContext* temp = source_context_; source_context_ = NULL; return temp; } - void Type::set_allocated_source_context(::google::protobuf::SourceContext* source_context) { +void Type::set_allocated_source_context(::google::protobuf::SourceContext* source_context) { delete source_context_; source_context_ = source_context; if (source_context) { @@ -1182,10 +1182,10 @@ bool Field::MergePartialFromCodedStream( parse_name: DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::PARSE, - "google.protobuf.Field.name"); + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.Field.name")); } else { goto handle_unusual; } @@ -1199,10 +1199,10 @@ bool Field::MergePartialFromCodedStream( parse_type_url: DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_type_url())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->type_url().data(), this->type_url().length(), - ::google::protobuf::internal::WireFormat::PARSE, - "google.protobuf.Field.type_url"); + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.Field.type_url")); } else { goto handle_unusual; } @@ -1263,10 +1263,10 @@ bool Field::MergePartialFromCodedStream( parse_json_name: DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_json_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->json_name().data(), this->json_name().length(), - ::google::protobuf::internal::WireFormat::PARSE, - "google.protobuf.Field.json_name"); + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.Field.json_name")); } else { goto handle_unusual; } @@ -1317,9 +1317,9 @@ void Field::SerializeWithCachedSizes( // optional string name = 4; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->name(), output); @@ -1327,9 +1327,9 @@ void Field::SerializeWithCachedSizes( // optional string type_url = 6; if (this->type_url().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->type_url().data(), this->type_url().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.type_url"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 6, this->type_url(), output); @@ -1353,9 +1353,9 @@ void Field::SerializeWithCachedSizes( // optional string json_name = 10; if (this->json_name().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->json_name().data(), this->json_name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.json_name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 10, this->json_name(), output); @@ -1386,9 +1386,9 @@ void Field::SerializeWithCachedSizes( // optional string name = 4; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( @@ -1397,9 +1397,9 @@ void Field::SerializeWithCachedSizes( // optional string type_url = 6; if (this->type_url().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->type_url().data(), this->type_url().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.type_url"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( @@ -1425,9 +1425,9 @@ void Field::SerializeWithCachedSizes( // optional string json_name = 10; if (this->json_name().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->json_name().data(), this->json_name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.json_name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( @@ -1760,28 +1760,28 @@ int Field::options_size() const { void Field::clear_options() { options_.Clear(); } - const ::google::protobuf::Option& Field::options(int index) const { +const ::google::protobuf::Option& Field::options(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Field.options) return options_.Get(index); } - ::google::protobuf::Option* Field::mutable_options(int index) { +::google::protobuf::Option* Field::mutable_options(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Field.options) return options_.Mutable(index); } - ::google::protobuf::Option* Field::add_options() { +::google::protobuf::Option* Field::add_options() { // @@protoc_insertion_point(field_add:google.protobuf.Field.options) return options_.Add(); } - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& -Field::options() const { - // @@protoc_insertion_point(field_list:google.protobuf.Field.options) - return options_; -} - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* +::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* Field::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Field.options) return &options_; } +const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& +Field::options() const { + // @@protoc_insertion_point(field_list:google.protobuf.Field.options) + return options_; +} // optional string json_name = 10; void Field::clear_json_name() { @@ -1927,10 +1927,10 @@ bool Enum::MergePartialFromCodedStream( if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::PARSE, - "google.protobuf.Enum.name"); + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.Enum.name")); } else { goto handle_unusual; } @@ -2026,9 +2026,9 @@ void Enum::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_start:google.protobuf.Enum) // optional string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Enum.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); @@ -2066,9 +2066,9 @@ void Enum::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Enum) // optional string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Enum.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( @@ -2271,28 +2271,28 @@ int Enum::enumvalue_size() const { void Enum::clear_enumvalue() { enumvalue_.Clear(); } - const ::google::protobuf::EnumValue& Enum::enumvalue(int index) const { +const ::google::protobuf::EnumValue& Enum::enumvalue(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Enum.enumvalue) return enumvalue_.Get(index); } - ::google::protobuf::EnumValue* Enum::mutable_enumvalue(int index) { +::google::protobuf::EnumValue* Enum::mutable_enumvalue(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.enumvalue) return enumvalue_.Mutable(index); } - ::google::protobuf::EnumValue* Enum::add_enumvalue() { +::google::protobuf::EnumValue* Enum::add_enumvalue() { // @@protoc_insertion_point(field_add:google.protobuf.Enum.enumvalue) return enumvalue_.Add(); } - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >& -Enum::enumvalue() const { - // @@protoc_insertion_point(field_list:google.protobuf.Enum.enumvalue) - return enumvalue_; -} - ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >* +::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >* Enum::mutable_enumvalue() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.enumvalue) return &enumvalue_; } +const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >& +Enum::enumvalue() const { + // @@protoc_insertion_point(field_list:google.protobuf.Enum.enumvalue) + return enumvalue_; +} // repeated .google.protobuf.Option options = 3; int Enum::options_size() const { @@ -2301,28 +2301,28 @@ int Enum::options_size() const { void Enum::clear_options() { options_.Clear(); } - const ::google::protobuf::Option& Enum::options(int index) const { +const ::google::protobuf::Option& Enum::options(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Enum.options) return options_.Get(index); } - ::google::protobuf::Option* Enum::mutable_options(int index) { +::google::protobuf::Option* Enum::mutable_options(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.options) return options_.Mutable(index); } - ::google::protobuf::Option* Enum::add_options() { +::google::protobuf::Option* Enum::add_options() { // @@protoc_insertion_point(field_add:google.protobuf.Enum.options) return options_.Add(); } - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& -Enum::options() const { - // @@protoc_insertion_point(field_list:google.protobuf.Enum.options) - return options_; -} - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* +::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* Enum::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.options) return &options_; } +const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& +Enum::options() const { + // @@protoc_insertion_point(field_list:google.protobuf.Enum.options) + return options_; +} // optional .google.protobuf.SourceContext source_context = 4; bool Enum::has_source_context() const { @@ -2332,11 +2332,11 @@ void Enum::clear_source_context() { if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_; source_context_ = NULL; } - const ::google::protobuf::SourceContext& Enum::source_context() const { +const ::google::protobuf::SourceContext& Enum::source_context() const { // @@protoc_insertion_point(field_get:google.protobuf.Enum.source_context) return source_context_ != NULL ? *source_context_ : *default_instance_->source_context_; } - ::google::protobuf::SourceContext* Enum::mutable_source_context() { +::google::protobuf::SourceContext* Enum::mutable_source_context() { if (source_context_ == NULL) { source_context_ = new ::google::protobuf::SourceContext; @@ -2344,13 +2344,13 @@ void Enum::clear_source_context() { // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.source_context) return source_context_; } - ::google::protobuf::SourceContext* Enum::release_source_context() { +::google::protobuf::SourceContext* Enum::release_source_context() { ::google::protobuf::SourceContext* temp = source_context_; source_context_ = NULL; return temp; } - void Enum::set_allocated_source_context(::google::protobuf::SourceContext* source_context) { +void Enum::set_allocated_source_context(::google::protobuf::SourceContext* source_context) { delete source_context_; source_context_ = source_context; if (source_context) { @@ -2468,10 +2468,10 @@ bool EnumValue::MergePartialFromCodedStream( if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::PARSE, - "google.protobuf.EnumValue.name"); + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.EnumValue.name")); } else { goto handle_unusual; } @@ -2537,9 +2537,9 @@ void EnumValue::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValue) // optional string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.EnumValue.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); @@ -2564,9 +2564,9 @@ void EnumValue::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValue) // optional string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.EnumValue.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( @@ -2748,28 +2748,28 @@ int EnumValue::options_size() const { void EnumValue::clear_options() { options_.Clear(); } - const ::google::protobuf::Option& EnumValue::options(int index) const { +const ::google::protobuf::Option& EnumValue::options(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.options) return options_.Get(index); } - ::google::protobuf::Option* EnumValue::mutable_options(int index) { +::google::protobuf::Option* EnumValue::mutable_options(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValue.options) return options_.Mutable(index); } - ::google::protobuf::Option* EnumValue::add_options() { +::google::protobuf::Option* EnumValue::add_options() { // @@protoc_insertion_point(field_add:google.protobuf.EnumValue.options) return options_.Add(); } - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& -EnumValue::options() const { - // @@protoc_insertion_point(field_list:google.protobuf.EnumValue.options) - return options_; -} - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* +::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* EnumValue::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValue.options) return &options_; } +const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& +EnumValue::options() const { + // @@protoc_insertion_point(field_list:google.protobuf.EnumValue.options) + return options_; +} #endif // PROTOBUF_INLINE_NOT_IN_HEADERS @@ -2865,10 +2865,10 @@ bool Option::MergePartialFromCodedStream( if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::PARSE, - "google.protobuf.Option.name"); + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.Option.name")); } else { goto handle_unusual; } @@ -2915,9 +2915,9 @@ void Option::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_start:google.protobuf.Option) // optional string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Option.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); @@ -2937,9 +2937,9 @@ void Option::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Option) // optional string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Option.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( @@ -3093,11 +3093,11 @@ void Option::clear_value() { if (GetArenaNoVirtual() == NULL && value_ != NULL) delete value_; value_ = NULL; } - const ::google::protobuf::Any& Option::value() const { +const ::google::protobuf::Any& Option::value() const { // @@protoc_insertion_point(field_get:google.protobuf.Option.value) return value_ != NULL ? *value_ : *default_instance_->value_; } - ::google::protobuf::Any* Option::mutable_value() { +::google::protobuf::Any* Option::mutable_value() { if (value_ == NULL) { value_ = new ::google::protobuf::Any; @@ -3105,13 +3105,13 @@ void Option::clear_value() { // @@protoc_insertion_point(field_mutable:google.protobuf.Option.value) return value_; } - ::google::protobuf::Any* Option::release_value() { +::google::protobuf::Any* Option::release_value() { ::google::protobuf::Any* temp = value_; value_ = NULL; return temp; } - void Option::set_allocated_value(::google::protobuf::Any* value) { +void Option::set_allocated_value(::google::protobuf::Any* value) { delete value_; value_ = value; if (value) { diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h index 0d0aa2fc..deda9213 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h @@ -40,11 +40,11 @@ void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto(); void protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto(); void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto(); -class Type; -class Field; class Enum; class EnumValue; +class Field; class Option; +class Type; enum Field_Kind { Field_Kind_TYPE_UNKNOWN = 0, @@ -204,10 +204,10 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message { const ::google::protobuf::Field& fields(int index) const; ::google::protobuf::Field* mutable_fields(int index); ::google::protobuf::Field* add_fields(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >& - fields() const; ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >* mutable_fields(); + const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >& + fields() const; // repeated string oneofs = 3; int oneofs_size() const; @@ -232,10 +232,10 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message { const ::google::protobuf::Option& options(int index) const; ::google::protobuf::Option* mutable_options(int index); ::google::protobuf::Option* add_options(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& - options() const; ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* mutable_options(); + const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& + options() const; // optional .google.protobuf.SourceContext source_context = 5; bool has_source_context() const; @@ -455,10 +455,10 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message { const ::google::protobuf::Option& options(int index) const; ::google::protobuf::Option* mutable_options(int index); ::google::protobuf::Option* add_options(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& - options() const; ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* mutable_options(); + const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& + options() const; // optional string json_name = 10; void clear_json_name(); @@ -569,10 +569,10 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message { const ::google::protobuf::EnumValue& enumvalue(int index) const; ::google::protobuf::EnumValue* mutable_enumvalue(int index); ::google::protobuf::EnumValue* add_enumvalue(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >& - enumvalue() const; ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >* mutable_enumvalue(); + const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >& + enumvalue() const; // repeated .google.protobuf.Option options = 3; int options_size() const; @@ -581,10 +581,10 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message { const ::google::protobuf::Option& options(int index) const; ::google::protobuf::Option* mutable_options(int index); ::google::protobuf::Option* add_options(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& - options() const; ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* mutable_options(); + const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& + options() const; // optional .google.protobuf.SourceContext source_context = 4; bool has_source_context() const; @@ -701,10 +701,10 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message { const ::google::protobuf::Option& options(int index) const; ::google::protobuf::Option* mutable_options(int index); ::google::protobuf::Option* add_options(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& - options() const; ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* mutable_options(); + const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& + options() const; // @@protoc_insertion_point(class_scope:google.protobuf.EnumValue) private: @@ -885,16 +885,16 @@ inline ::google::protobuf::Field* Type::add_fields() { // @@protoc_insertion_point(field_add:google.protobuf.Type.fields) return fields_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >& -Type::fields() const { - // @@protoc_insertion_point(field_list:google.protobuf.Type.fields) - return fields_; -} inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >* Type::mutable_fields() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.fields) return &fields_; } +inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >& +Type::fields() const { + // @@protoc_insertion_point(field_list:google.protobuf.Type.fields) + return fields_; +} // repeated string oneofs = 3; inline int Type::oneofs_size() const { @@ -969,16 +969,16 @@ inline ::google::protobuf::Option* Type::add_options() { // @@protoc_insertion_point(field_add:google.protobuf.Type.options) return options_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& -Type::options() const { - // @@protoc_insertion_point(field_list:google.protobuf.Type.options) - return options_; -} inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* Type::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.options) return &options_; } +inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& +Type::options() const { + // @@protoc_insertion_point(field_list:google.protobuf.Type.options) + return options_; +} // optional .google.protobuf.SourceContext source_context = 5; inline bool Type::has_source_context() const { @@ -1210,16 +1210,16 @@ inline ::google::protobuf::Option* Field::add_options() { // @@protoc_insertion_point(field_add:google.protobuf.Field.options) return options_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& -Field::options() const { - // @@protoc_insertion_point(field_list:google.protobuf.Field.options) - return options_; -} inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* Field::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Field.options) return &options_; } +inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& +Field::options() const { + // @@protoc_insertion_point(field_list:google.protobuf.Field.options) + return options_; +} // optional string json_name = 10; inline void Field::clear_json_name() { @@ -1330,16 +1330,16 @@ inline ::google::protobuf::EnumValue* Enum::add_enumvalue() { // @@protoc_insertion_point(field_add:google.protobuf.Enum.enumvalue) return enumvalue_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >& -Enum::enumvalue() const { - // @@protoc_insertion_point(field_list:google.protobuf.Enum.enumvalue) - return enumvalue_; -} inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >* Enum::mutable_enumvalue() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.enumvalue) return &enumvalue_; } +inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >& +Enum::enumvalue() const { + // @@protoc_insertion_point(field_list:google.protobuf.Enum.enumvalue) + return enumvalue_; +} // repeated .google.protobuf.Option options = 3; inline int Enum::options_size() const { @@ -1360,16 +1360,16 @@ inline ::google::protobuf::Option* Enum::add_options() { // @@protoc_insertion_point(field_add:google.protobuf.Enum.options) return options_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& -Enum::options() const { - // @@protoc_insertion_point(field_list:google.protobuf.Enum.options) - return options_; -} inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* Enum::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.options) return &options_; } +inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& +Enum::options() const { + // @@protoc_insertion_point(field_list:google.protobuf.Enum.options) + return options_; +} // optional .google.protobuf.SourceContext source_context = 4; inline bool Enum::has_source_context() const { @@ -1502,16 +1502,16 @@ inline ::google::protobuf::Option* EnumValue::add_options() { // @@protoc_insertion_point(field_add:google.protobuf.EnumValue.options) return options_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& -EnumValue::options() const { - // @@protoc_insertion_point(field_list:google.protobuf.EnumValue.options) - return options_; -} inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* EnumValue::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValue.options) return &options_; } +inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& +EnumValue::options() const { + // @@protoc_insertion_point(field_list:google.protobuf.EnumValue.options) + return options_; +} // ------------------------------------------------------------------- diff --git a/src/google/protobuf/util/field_comparator_test.cc b/src/google/protobuf/util/field_comparator_test.cc index 748c7d11..845839ac 100644 --- a/src/google/protobuf/util/field_comparator_test.cc +++ b/src/google/protobuf/util/field_comparator_test.cc @@ -34,8 +34,8 @@ #include <google/protobuf/unittest.pb.h> #include <google/protobuf/descriptor.h> -#include <gtest/gtest.h> #include <google/protobuf/stubs/mathutil.h> +#include <gtest/gtest.h> namespace google { namespace protobuf { diff --git a/src/google/protobuf/util/internal/utility.cc b/src/google/protobuf/util/internal/utility.cc index 2d63de00..9d80fa08 100644 --- a/src/google/protobuf/util/internal/utility.cc +++ b/src/google/protobuf/util/internal/utility.cc @@ -30,10 +30,6 @@ #include <google/protobuf/util/internal/utility.h> -#include <cmath> -#include <algorithm> -#include <utility> - #include <google/protobuf/stubs/callback.h> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/logging.h> @@ -303,9 +299,9 @@ bool IsMap(const google::protobuf::Field& field, } string DoubleAsString(double value) { - if (value == std::numeric_limits<double>::infinity()) return "Infinity"; - if (value == -std::numeric_limits<double>::infinity()) return "-Infinity"; - if (MathLimits<double>::IsNaN(value)) return "NaN"; + if (google::protobuf::MathLimits<double>::IsPosInf(value)) return "Infinity"; + if (google::protobuf::MathLimits<double>::IsNegInf(value)) return "-Infinity"; + if (google::protobuf::MathLimits<double>::IsNaN(value)) return "NaN"; return SimpleDtoa(value); } @@ -322,8 +318,7 @@ bool SafeStrToFloat(StringPiece str, float *value) { } *value = static_cast<float>(double_value); - if ((*value == numeric_limits<float>::infinity()) || - (*value == -numeric_limits<float>::infinity())) { + if (google::protobuf::MathLimits<float>::IsInf(*value)) { return false; } return true; diff --git a/src/google/protobuf/wrappers.pb.cc b/src/google/protobuf/wrappers.pb.cc index fd4b4903..b2a7e970 100644 --- a/src/google/protobuf/wrappers.pb.cc +++ b/src/google/protobuf/wrappers.pb.cc @@ -1968,10 +1968,10 @@ bool StringValue::MergePartialFromCodedStream( if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_value())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->value().data(), this->value().length(), - ::google::protobuf::internal::WireFormat::PARSE, - "google.protobuf.StringValue.value"); + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.protobuf.StringValue.value")); } else { goto handle_unusual; } @@ -2005,9 +2005,9 @@ void StringValue::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_start:google.protobuf.StringValue) // optional string value = 1; if (this->value().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->value().data(), this->value().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.StringValue.value"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->value(), output); @@ -2021,9 +2021,9 @@ void StringValue::SerializeWithCachedSizes( // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.StringValue) // optional string value = 1; if (this->value().size() > 0) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->value().data(), this->value().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.StringValue.value"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( diff --git a/src/google/protobuf/wrappers.pb.h b/src/google/protobuf/wrappers.pb.h index 387ebd7c..15bcc7a2 100644 --- a/src/google/protobuf/wrappers.pb.h +++ b/src/google/protobuf/wrappers.pb.h @@ -37,15 +37,15 @@ void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fwrappers_2eproto(); void protobuf_AssignDesc_google_2fprotobuf_2fwrappers_2eproto(); void protobuf_ShutdownFile_google_2fprotobuf_2fwrappers_2eproto(); +class BoolValue; +class BytesValue; class DoubleValue; class FloatValue; -class Int64Value; -class UInt64Value; class Int32Value; -class UInt32Value; -class BoolValue; +class Int64Value; class StringValue; -class BytesValue; +class UInt32Value; +class UInt64Value; // =================================================================== |