From 88b5b19c99e49aa6597b8a4168a27f906f48e8df Mon Sep 17 00:00:00 2001 From: Adam Cozzette Date: Wed, 3 May 2023 15:36:48 -0700 Subject: [PATCH] Rename `target` field to `target_obsolete_do_not_use` PiperOrigin-RevId: 529209314 --- ruby/ext/google/protobuf_c/ruby-upb.h | 8 +- src/google/protobuf/descriptor.pb.cc | 168 +++++++++++++------------- src/google/protobuf/descriptor.pb.h | 70 +++++------ src/google/protobuf/descriptor.proto | 2 +- 4 files changed, 124 insertions(+), 124 deletions(-) diff --git a/ruby/ext/google/protobuf_c/ruby-upb.h b/ruby/ext/google/protobuf_c/ruby-upb.h index 7a74b4065b..b2d58edc70 100755 --- a/ruby/ext/google/protobuf_c/ruby-upb.h +++ b/ruby/ext/google/protobuf_c/ruby-upb.h @@ -7156,18 +7156,18 @@ UPB_INLINE bool google_protobuf_FieldOptions_has_retention(const google_protobuf const upb_MiniTableField field = {17, 20, 9, 2, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; return _upb_Message_HasNonExtensionField(msg, &field); } -UPB_INLINE void google_protobuf_FieldOptions_clear_target(google_protobuf_FieldOptions* msg) { +UPB_INLINE void google_protobuf_FieldOptions_clear_target_obsolete_do_not_use(google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {18, 24, 10, 3, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; _upb_Message_ClearNonExtensionField(msg, &field); } -UPB_INLINE int32_t google_protobuf_FieldOptions_target(const google_protobuf_FieldOptions* msg) { +UPB_INLINE int32_t google_protobuf_FieldOptions_target_obsolete_do_not_use(const google_protobuf_FieldOptions* msg) { int32_t default_val = 0; int32_t ret; const upb_MiniTableField field = {18, 24, 10, 3, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret); return ret; } -UPB_INLINE bool google_protobuf_FieldOptions_has_target(const google_protobuf_FieldOptions* msg) { +UPB_INLINE bool google_protobuf_FieldOptions_has_target_obsolete_do_not_use(const google_protobuf_FieldOptions* msg) { const upb_MiniTableField field = {18, 24, 10, 3, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; return _upb_Message_HasNonExtensionField(msg, &field); } @@ -7282,7 +7282,7 @@ UPB_INLINE void google_protobuf_FieldOptions_set_retention(google_protobuf_Field const upb_MiniTableField field = {17, 20, 9, 2, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; _upb_Message_SetNonExtensionField(msg, &field, &value); } -UPB_INLINE void google_protobuf_FieldOptions_set_target(google_protobuf_FieldOptions *msg, int32_t value) { +UPB_INLINE void google_protobuf_FieldOptions_set_target_obsolete_do_not_use(google_protobuf_FieldOptions *msg, int32_t value) { const upb_MiniTableField field = {18, 24, 10, 3, 14, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; _upb_Message_SetNonExtensionField(msg, &field, &value); } diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc index 8724006013..7562aed8c0 100644 --- a/src/google/protobuf/descriptor.pb.cc +++ b/src/google/protobuf/descriptor.pb.cc @@ -491,7 +491,7 @@ PROTOBUF_CONSTEXPR FieldOptions::FieldOptions( , /*decltype(_impl_.retention_)*/ 0 - , /*decltype(_impl_.target_)*/ 0 + , /*decltype(_impl_.target_obsolete_do_not_use_)*/ 0 } {} struct FieldOptionsDefaultTypeInternal { PROTOBUF_CONSTEXPR FieldOptionsDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -1078,9 +1078,9 @@ const ::uint32_t TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets[] P PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _impl_.weak_), PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _impl_.debug_redact_), PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _impl_.retention_), - PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _impl_.target_), PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _impl_.targets_), PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _impl_.uninterpreted_option_), + PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _impl_.target_obsolete_do_not_use_), 0, 2, 1, @@ -1090,9 +1090,9 @@ const ::uint32_t TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets[] P 6, 7, 8, - 9, ~0u, ~0u, + 9, ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::OneofOptions, _internal_metadata_), PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::OneofOptions, _impl_._extensions_), @@ -1420,7 +1420,7 @@ const char descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto[] PR "cts\030\013 \001(\010B\002\030\001\022C\n\024uninterpreted_option\030\347\007" " \003(\0132$.google.protobuf.UninterpretedOpti" "on*\t\010\350\007\020\200\200\200\200\002J\004\010\004\020\005J\004\010\005\020\006J\004\010\006\020\007J\004\010\010\020\tJ\004\010" - "\t\020\n\"\210\010\n\014FieldOptions\022:\n\005ctype\030\001 \001(\0162#.go" + "\t\020\n\"\234\010\n\014FieldOptions\022:\n\005ctype\030\001 \001(\0162#.go" "ogle.protobuf.FieldOptions.CType:\006STRING" "\022\016\n\006packed\030\002 \001(\010\022\?\n\006jstype\030\006 \001(\0162$.googl" "e.protobuf.FieldOptions.JSType:\tJS_NORMA" @@ -1428,75 +1428,75 @@ const char descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto[] PR "y\030\017 \001(\010:\005false\022\031\n\ndeprecated\030\003 \001(\010:\005fals" "e\022\023\n\004weak\030\n \001(\010:\005false\022\033\n\014debug_redact\030\020" " \001(\010:\005false\022@\n\tretention\030\021 \001(\0162-.google." - "protobuf.FieldOptions.OptionRetention\022B\n" - "\006target\030\022 \001(\0162..google.protobuf.FieldOpt" - "ions.OptionTargetTypeB\002\030\001\022\?\n\007targets\030\023 \003" - "(\0162..google.protobuf.FieldOptions.Option" - "TargetType\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\"U\n\017OptionRetenti" - "on\022\025\n\021RETENTION_UNKNOWN\020\000\022\025\n\021RETENTION_R" - "UNTIME\020\001\022\024\n\020RETENTION_SOURCE\020\002\"\214\002\n\020Optio" - "nTargetType\022\027\n\023TARGET_TYPE_UNKNOWN\020\000\022\024\n\020" - "TARGET_TYPE_FILE\020\001\022\037\n\033TARGET_TYPE_EXTENS" - "ION_RANGE\020\002\022\027\n\023TARGET_TYPE_MESSAGE\020\003\022\025\n\021" - "TARGET_TYPE_FIELD\020\004\022\025\n\021TARGET_TYPE_ONEOF" - "\020\005\022\024\n\020TARGET_TYPE_ENUM\020\006\022\032\n\026TARGET_TYPE_" - "ENUM_ENTRY\020\007\022\027\n\023TARGET_TYPE_SERVICE\020\010\022\026\n" - "\022TARGET_TYPE_METHOD\020\t*\t\010\350\007\020\200\200\200\200\002J\004\010\004\020\005\"^" - "\n\014OneofOptions\022C\n\024uninterpreted_option\030\347" - "\007 \003(\0132$.google.protobuf.UninterpretedOpt" - "ion*\t\010\350\007\020\200\200\200\200\002\"\307\001\n\013EnumOptions\022\023\n\013allow_" - "alias\030\002 \001(\010\022\031\n\ndeprecated\030\003 \001(\010:\005false\0222" - "\n&deprecated_legacy_json_field_conflicts" - "\030\006 \001(\010B\002\030\001\022C\n\024uninterpreted_option\030\347\007 \003(" - "\0132$.google.protobuf.UninterpretedOption*" - "\t\010\350\007\020\200\200\200\200\002J\004\010\005\020\006\"}\n\020EnumValueOptions\022\031\n\n" - "deprecated\030\001 \001(\010:\005false\022C\n\024uninterpreted" - "_option\030\347\007 \003(\0132$.google.protobuf.Uninter" - "pretedOption*\t\010\350\007\020\200\200\200\200\002\"{\n\016ServiceOption" - "s\022\031\n\ndeprecated\030! \001(\010:\005false\022C\n\024uninterp" - "reted_option\030\347\007 \003(\0132$.google.protobuf.Un" - "interpretedOption*\t\010\350\007\020\200\200\200\200\002\"\255\002\n\rMethodO" - "ptions\022\031\n\ndeprecated\030! \001(\010:\005false\022_\n\021ide" - "mpotency_level\030\" \001(\0162/.google.protobuf.M" - "ethodOptions.IdempotencyLevel:\023IDEMPOTEN" - "CY_UNKNOWN\022C\n\024uninterpreted_option\030\347\007 \003(" - "\0132$.google.protobuf.UninterpretedOption\"" - "P\n\020IdempotencyLevel\022\027\n\023IDEMPOTENCY_UNKNO" - "WN\020\000\022\023\n\017NO_SIDE_EFFECTS\020\001\022\016\n\nIDEMPOTENT\020" - "\002*\t\010\350\007\020\200\200\200\200\002\"\236\002\n\023UninterpretedOption\022;\n\004" - "name\030\002 \003(\0132-.google.protobuf.Uninterpret" - "edOption.NamePart\022\030\n\020identifier_value\030\003 " - "\001(\t\022\032\n\022positive_int_value\030\004 \001(\004\022\032\n\022negat" - "ive_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_val" - "ue\030\010 \001(\t\0323\n\010NamePart\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.Sou" - "rceCodeInfo.Location\032\206\001\n\010Location\022\020\n\004pat" - "h\030\001 \003(\005B\002\020\001\022\020\n\004span\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_detached_comments\030\006 \003(\t\"\234\002" - "\n\021GeneratedCodeInfo\022A\n\nannotation\030\001 \003(\0132" - "-.google.protobuf.GeneratedCodeInfo.Anno" - "tation\032\303\001\n\nAnnotation\022\020\n\004path\030\001 \003(\005B\002\020\001\022" - "\023\n\013source_file\030\002 \001(\t\022\r\n\005begin\030\003 \001(\005\022\013\n\003e" - "nd\030\004 \001(\005\022H\n\010semantic\030\005 \001(\01626.google.prot" - "obuf.GeneratedCodeInfo.Annotation.Semant" - "ic\"(\n\010Semantic\022\010\n\004NONE\020\000\022\007\n\003SET\020\001\022\t\n\005ALI" - "AS\020\002B~\n\023com.google.protobufB\020DescriptorP" - "rotosH\001Z-google.golang.org/protobuf/type" - "s/descriptorpb\370\001\001\242\002\003GPB\252\002\032Google.Protobu" - "f.Reflection" + "protobuf.FieldOptions.OptionRetention\022\?\n" + "\007targets\030\023 \003(\0162..google.protobuf.FieldOp" + "tions.OptionTargetType\022C\n\024uninterpreted_" + "option\030\347\007 \003(\0132$.google.protobuf.Uninterp" + "retedOption\022V\n\032target_obsolete_do_not_us" + "e\030\022 \001(\0162..google.protobuf.FieldOptions.O" + "ptionTargetTypeB\002\030\001\"/\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_NUMBE" + "R\020\002\"U\n\017OptionRetention\022\025\n\021RETENTION_UNKN" + "OWN\020\000\022\025\n\021RETENTION_RUNTIME\020\001\022\024\n\020RETENTIO" + "N_SOURCE\020\002\"\214\002\n\020OptionTargetType\022\027\n\023TARGE" + "T_TYPE_UNKNOWN\020\000\022\024\n\020TARGET_TYPE_FILE\020\001\022\037" + "\n\033TARGET_TYPE_EXTENSION_RANGE\020\002\022\027\n\023TARGE" + "T_TYPE_MESSAGE\020\003\022\025\n\021TARGET_TYPE_FIELD\020\004\022" + "\025\n\021TARGET_TYPE_ONEOF\020\005\022\024\n\020TARGET_TYPE_EN" + "UM\020\006\022\032\n\026TARGET_TYPE_ENUM_ENTRY\020\007\022\027\n\023TARG" + "ET_TYPE_SERVICE\020\010\022\026\n\022TARGET_TYPE_METHOD\020" + "\t*\t\010\350\007\020\200\200\200\200\002J\004\010\004\020\005\"^\n\014OneofOptions\022C\n\024un" + "interpreted_option\030\347\007 \003(\0132$.google.proto" + "buf.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"\307\001\n\013E" + "numOptions\022\023\n\013allow_alias\030\002 \001(\010\022\031\n\ndepre" + "cated\030\003 \001(\010:\005false\0222\n&deprecated_legacy_" + "json_field_conflicts\030\006 \001(\010B\002\030\001\022C\n\024uninte" + "rpreted_option\030\347\007 \003(\0132$.google.protobuf." + "UninterpretedOption*\t\010\350\007\020\200\200\200\200\002J\004\010\005\020\006\"}\n\020" + "EnumValueOptions\022\031\n\ndeprecated\030\001 \001(\010:\005fa" + "lse\022C\n\024uninterpreted_option\030\347\007 \003(\0132$.goo" + "gle.protobuf.UninterpretedOption*\t\010\350\007\020\200\200" + "\200\200\002\"{\n\016ServiceOptions\022\031\n\ndeprecated\030! \001(" + "\010:\005false\022C\n\024uninterpreted_option\030\347\007 \003(\0132" + "$.google.protobuf.UninterpretedOption*\t\010" + "\350\007\020\200\200\200\200\002\"\255\002\n\rMethodOptions\022\031\n\ndeprecated" + "\030! \001(\010:\005false\022_\n\021idempotency_level\030\" \001(\016" + "2/.google.protobuf.MethodOptions.Idempot" + "encyLevel:\023IDEMPOTENCY_UNKNOWN\022C\n\024uninte" + "rpreted_option\030\347\007 \003(\0132$.google.protobuf." + "UninterpretedOption\"P\n\020IdempotencyLevel\022" + "\027\n\023IDEMPOTENCY_UNKNOWN\020\000\022\023\n\017NO_SIDE_EFFE" + "CTS\020\001\022\016\n\nIDEMPOTENT\020\002*\t\010\350\007\020\200\200\200\200\002\"\236\002\n\023Uni" + "nterpretedOption\022;\n\004name\030\002 \003(\0132-.google." + "protobuf.UninterpretedOption.NamePart\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_value\030\007 " + "\001(\014\022\027\n\017aggregate_value\030\010 \001(\t\0323\n\010NamePart" + "\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.Location" + "\032\206\001\n\010Location\022\020\n\004path\030\001 \003(\005B\002\020\001\022\020\n\004span\030" + "\002 \003(\005B\002\020\001\022\030\n\020leading_comments\030\003 \001(\t\022\031\n\021t" + "railing_comments\030\004 \001(\t\022!\n\031leading_detach" + "ed_comments\030\006 \003(\t\"\234\002\n\021GeneratedCodeInfo\022" + "A\n\nannotation\030\001 \003(\0132-.google.protobuf.Ge" + "neratedCodeInfo.Annotation\032\303\001\n\nAnnotatio" + "n\022\020\n\004path\030\001 \003(\005B\002\020\001\022\023\n\013source_file\030\002 \001(\t" + "\022\r\n\005begin\030\003 \001(\005\022\013\n\003end\030\004 \001(\005\022H\n\010semantic" + "\030\005 \001(\01626.google.protobuf.GeneratedCodeIn" + "fo.Annotation.Semantic\"(\n\010Semantic\022\010\n\004NO" + "NE\020\000\022\007\n\003SET\020\001\022\t\n\005ALIAS\020\002B~\n\023com.google.p" + "rotobufB\020DescriptorProtosH\001Z-google.gola" + "ng.org/protobuf/types/descriptorpb\370\001\001\242\002\003" + "GPB\252\002\032Google.Protobuf.Reflection" }; static ::absl::once_flag descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2fdescriptor_2eproto = { false, false, - 7252, + 7272, descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto, "google/protobuf/descriptor.proto", &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once, @@ -8772,7 +8772,7 @@ class FieldOptions::_Internal { static void set_has_retention(HasBits* has_bits) { (*has_bits)[0] |= 256u; } - static void set_has_target(HasBits* has_bits) { + static void set_has_target_obsolete_do_not_use(HasBits* has_bits) { (*has_bits)[0] |= 512u; } }; @@ -8810,14 +8810,14 @@ FieldOptions::FieldOptions(const FieldOptions& from) , decltype(_impl_.retention_) {} - , decltype(_impl_.target_) {} + , decltype(_impl_.target_obsolete_do_not_use_) {} }; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_); ::memcpy(&_impl_.ctype_, &from._impl_.ctype_, - static_cast<::size_t>(reinterpret_cast(&_impl_.target_) - - reinterpret_cast(&_impl_.ctype_)) + sizeof(_impl_.target_)); + static_cast<::size_t>(reinterpret_cast(&_impl_.target_obsolete_do_not_use_) - + reinterpret_cast(&_impl_.ctype_)) + sizeof(_impl_.target_obsolete_do_not_use_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldOptions) } @@ -8848,7 +8848,7 @@ inline void FieldOptions::SharedCtor(::_pb::Arena* arena) { , decltype(_impl_.retention_) { 0 } - , decltype(_impl_.target_) { 0 } + , decltype(_impl_.target_obsolete_do_not_use_) { 0 } }; } @@ -8890,8 +8890,8 @@ PROTOBUF_NOINLINE void FieldOptions::Clear() { } if (cached_has_bits & 0x00000300u) { ::memset(&_impl_.retention_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.target_) - - reinterpret_cast(&_impl_.retention_)) + sizeof(_impl_.target_)); + reinterpret_cast(&_impl_.target_obsolete_do_not_use_) - + reinterpret_cast(&_impl_.retention_)) + sizeof(_impl_.target_obsolete_do_not_use_)); } _impl_._has_bits_.Clear(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); @@ -9006,13 +9006,13 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* goto handle_unusual; } continue; - // optional .google.protobuf.FieldOptions.OptionTargetType target = 18 [deprecated = true]; + // optional .google.protobuf.FieldOptions.OptionTargetType target_obsolete_do_not_use = 18 [deprecated = true]; case 18: if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 144)) { ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); CHK_(ptr); if (PROTOBUF_PREDICT_TRUE(::PROTOBUF_NAMESPACE_ID::FieldOptions_OptionTargetType_IsValid(static_cast(val)))) { - _internal_set_target(static_cast<::PROTOBUF_NAMESPACE_ID::FieldOptions_OptionTargetType>(val)); + _internal_set_target_obsolete_do_not_use(static_cast<::PROTOBUF_NAMESPACE_ID::FieldOptions_OptionTargetType>(val)); } else { ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(18, val, mutable_unknown_fields()); } @@ -9155,11 +9155,11 @@ failure: 17, this->_internal_retention(), target); } - // optional .google.protobuf.FieldOptions.OptionTargetType target = 18 [deprecated = true]; + // optional .google.protobuf.FieldOptions.OptionTargetType target_obsolete_do_not_use = 18 [deprecated = true]; if (cached_has_bits & 0x00000200u) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( - 18, this->_internal_target(), target); + 18, this->_internal_target_obsolete_do_not_use(), target); } // repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19; @@ -9272,10 +9272,10 @@ failure: ::_pbi::WireFormatLite::EnumSize(this->_internal_retention()); } - // optional .google.protobuf.FieldOptions.OptionTargetType target = 18 [deprecated = true]; + // optional .google.protobuf.FieldOptions.OptionTargetType target_obsolete_do_not_use = 18 [deprecated = true]; if (cached_has_bits & 0x00000200u) { total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_target()); + ::_pbi::WireFormatLite::EnumSize(this->_internal_target_obsolete_do_not_use()); } } @@ -9332,7 +9332,7 @@ void FieldOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::P _this->_impl_.retention_ = from._impl_.retention_; } if (cached_has_bits & 0x00000200u) { - _this->_impl_.target_ = from._impl_.target_; + _this->_impl_.target_obsolete_do_not_use_ = from._impl_.target_obsolete_do_not_use_; } _this->_impl_._has_bits_[0] |= cached_has_bits; } @@ -9366,8 +9366,8 @@ void FieldOptions::InternalSwap(FieldOptions* other) { other->_internal_mutable_targets()); _internal_mutable_uninterpreted_option()->InternalSwap(other->_internal_mutable_uninterpreted_option()); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(FieldOptions, _impl_.target_) - + sizeof(FieldOptions::_impl_.target_) + PROTOBUF_FIELD_OFFSET(FieldOptions, _impl_.target_obsolete_do_not_use_) + + sizeof(FieldOptions::_impl_.target_obsolete_do_not_use_) - PROTOBUF_FIELD_OFFSET(FieldOptions, _impl_.ctype_)>( reinterpret_cast(&_impl_.ctype_), reinterpret_cast(&other->_impl_.ctype_)); diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h index a5bfe08e08..b8c4e897db 100644 --- a/src/google/protobuf/descriptor.pb.h +++ b/src/google/protobuf/descriptor.pb.h @@ -5265,7 +5265,7 @@ class PROTOBUF_EXPORT FieldOptions final : kWeakFieldNumber = 10, kDebugRedactFieldNumber = 16, kRetentionFieldNumber = 17, - kTargetFieldNumber = 18, + kTargetObsoleteDoNotUseFieldNumber = 18, }; // repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19; int targets_size() const; @@ -5403,15 +5403,15 @@ class PROTOBUF_EXPORT FieldOptions final : void _internal_set_retention(::PROTOBUF_NAMESPACE_ID::FieldOptions_OptionRetention value); public: - // optional .google.protobuf.FieldOptions.OptionTargetType target = 18 [deprecated = true]; - [[deprecated]] bool has_target() const; - [[deprecated]] void clear_target() ; - [[deprecated]] ::PROTOBUF_NAMESPACE_ID::FieldOptions_OptionTargetType target() const; - [[deprecated]] void set_target(::PROTOBUF_NAMESPACE_ID::FieldOptions_OptionTargetType value); + // optional .google.protobuf.FieldOptions.OptionTargetType target_obsolete_do_not_use = 18 [deprecated = true]; + [[deprecated]] bool has_target_obsolete_do_not_use() const; + [[deprecated]] void clear_target_obsolete_do_not_use() ; + [[deprecated]] ::PROTOBUF_NAMESPACE_ID::FieldOptions_OptionTargetType target_obsolete_do_not_use() const; + [[deprecated]] void set_target_obsolete_do_not_use(::PROTOBUF_NAMESPACE_ID::FieldOptions_OptionTargetType value); private: - ::PROTOBUF_NAMESPACE_ID::FieldOptions_OptionTargetType _internal_target() const; - void _internal_set_target(::PROTOBUF_NAMESPACE_ID::FieldOptions_OptionTargetType value); + ::PROTOBUF_NAMESPACE_ID::FieldOptions_OptionTargetType _internal_target_obsolete_do_not_use() const; + void _internal_set_target_obsolete_do_not_use(::PROTOBUF_NAMESPACE_ID::FieldOptions_OptionTargetType value); public: template (_impl_.target_); -} -inline void FieldOptions::_internal_set_target(::PROTOBUF_NAMESPACE_ID::FieldOptions_OptionTargetType value) { - assert(::PROTOBUF_NAMESPACE_ID::FieldOptions_OptionTargetType_IsValid(value)); - _impl_._has_bits_[0] |= 0x00000200u; - _impl_.target_ = value; -} - // repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19; inline int FieldOptions::_internal_targets_size() const { return _impl_.targets_.size(); @@ -13679,6 +13653,32 @@ FieldOptions::_internal_mutable_uninterpreted_option() { return &_impl_.uninterpreted_option_; } +// optional .google.protobuf.FieldOptions.OptionTargetType target_obsolete_do_not_use = 18 [deprecated = true]; +inline bool FieldOptions::has_target_obsolete_do_not_use() const { + bool value = (_impl_._has_bits_[0] & 0x00000200u) != 0; + return value; +} +inline void FieldOptions::clear_target_obsolete_do_not_use() { + _impl_.target_obsolete_do_not_use_ = 0; + _impl_._has_bits_[0] &= ~0x00000200u; +} +inline ::PROTOBUF_NAMESPACE_ID::FieldOptions_OptionTargetType FieldOptions::target_obsolete_do_not_use() const { + // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.target_obsolete_do_not_use) + return _internal_target_obsolete_do_not_use(); +} +inline void FieldOptions::set_target_obsolete_do_not_use(::PROTOBUF_NAMESPACE_ID::FieldOptions_OptionTargetType value) { + _internal_set_target_obsolete_do_not_use(value); + // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.target_obsolete_do_not_use) +} +inline ::PROTOBUF_NAMESPACE_ID::FieldOptions_OptionTargetType FieldOptions::_internal_target_obsolete_do_not_use() const { + return static_cast<::PROTOBUF_NAMESPACE_ID::FieldOptions_OptionTargetType>(_impl_.target_obsolete_do_not_use_); +} +inline void FieldOptions::_internal_set_target_obsolete_do_not_use(::PROTOBUF_NAMESPACE_ID::FieldOptions_OptionTargetType value) { + assert(::PROTOBUF_NAMESPACE_ID::FieldOptions_OptionTargetType_IsValid(value)); + _impl_._has_bits_[0] |= 0x00000200u; + _impl_.target_obsolete_do_not_use_ = value; +} + // ------------------------------------------------------------------- // OneofOptions diff --git a/src/google/protobuf/descriptor.proto b/src/google/protobuf/descriptor.proto index 171ac57c79..16c10a6c21 100644 --- a/src/google/protobuf/descriptor.proto +++ b/src/google/protobuf/descriptor.proto @@ -711,7 +711,6 @@ message FieldOptions { TARGET_TYPE_METHOD = 9; } - optional OptionTargetType target = 18 [deprecated = true]; repeated OptionTargetType targets = 19; // The parser stores options it doesn't recognize here. See above. @@ -721,6 +720,7 @@ message FieldOptions { extensions 1000 to max; reserved 4; // removed jtype + optional OptionTargetType target_obsolete_do_not_use = 18 [deprecated = true]; } message OneofOptions {