Auto-generate files after cl/580263087

pull/14671/head
Protobuf Team Bot 1 year ago
parent cf3a6f5868
commit ebef52ec2f
  1. 19
      php/ext/google/protobuf/php-upb.c
  2. 19
      ruby/ext/google/protobuf_c/ruby-upb.c

@ -9395,11 +9395,26 @@ upb_CType upb_FieldDef_CType(const upb_FieldDef* f) {
UPB_UNREACHABLE(); UPB_UNREACHABLE();
} }
upb_FieldType upb_FieldDef_Type(const upb_FieldDef* f) { return f->type_; } upb_FieldType upb_FieldDef_Type(const upb_FieldDef* f) {
// TODO: remove once we can deprecate kUpb_FieldType_Group.
if (f->type_ == kUpb_FieldType_Message &&
UPB_DESC(FeatureSet_message_encoding)(f->resolved_features) ==
UPB_DESC(FeatureSet_DELIMITED)) {
return kUpb_FieldType_Group;
}
return f->type_;
}
uint32_t upb_FieldDef_Index(const upb_FieldDef* f) { return f->index_; } uint32_t upb_FieldDef_Index(const upb_FieldDef* f) { return f->index_; }
upb_Label upb_FieldDef_Label(const upb_FieldDef* f) { return f->label_; } upb_Label upb_FieldDef_Label(const upb_FieldDef* f) {
// TODO: remove once we can deprecate kUpb_Label_Required.
if (UPB_DESC(FeatureSet_field_presence)(f->resolved_features) ==
UPB_DESC(FeatureSet_LEGACY_REQUIRED)) {
return kUpb_Label_Required;
}
return f->label_;
}
uint32_t upb_FieldDef_Number(const upb_FieldDef* f) { return f->number_; } uint32_t upb_FieldDef_Number(const upb_FieldDef* f) { return f->number_; }

@ -8910,11 +8910,26 @@ upb_CType upb_FieldDef_CType(const upb_FieldDef* f) {
UPB_UNREACHABLE(); UPB_UNREACHABLE();
} }
upb_FieldType upb_FieldDef_Type(const upb_FieldDef* f) { return f->type_; } upb_FieldType upb_FieldDef_Type(const upb_FieldDef* f) {
// TODO: remove once we can deprecate kUpb_FieldType_Group.
if (f->type_ == kUpb_FieldType_Message &&
UPB_DESC(FeatureSet_message_encoding)(f->resolved_features) ==
UPB_DESC(FeatureSet_DELIMITED)) {
return kUpb_FieldType_Group;
}
return f->type_;
}
uint32_t upb_FieldDef_Index(const upb_FieldDef* f) { return f->index_; } uint32_t upb_FieldDef_Index(const upb_FieldDef* f) { return f->index_; }
upb_Label upb_FieldDef_Label(const upb_FieldDef* f) { return f->label_; } upb_Label upb_FieldDef_Label(const upb_FieldDef* f) {
// TODO: remove once we can deprecate kUpb_Label_Required.
if (UPB_DESC(FeatureSet_field_presence)(f->resolved_features) ==
UPB_DESC(FeatureSet_LEGACY_REQUIRED)) {
return kUpb_Label_Required;
}
return f->label_;
}
uint32_t upb_FieldDef_Number(const upb_FieldDef* f) { return f->number_; } uint32_t upb_FieldDef_Number(const upb_FieldDef* f) { return f->number_; }

Loading…
Cancel
Save