Auto-generate files after cl/603158026

pull/15671/head
Protobuf Team Bot 10 months ago
parent 9a020c4a7b
commit 6f6d9b02e0
  1. 19
      php/ext/google/protobuf/php-upb.c
  2. 19
      ruby/ext/google/protobuf_c/ruby-upb.c

@ -15126,7 +15126,10 @@ void _upb_MessageDef_InsertField(upb_DefBuilder* ctx, upb_MessageDef* m,
_upb_MessageDef_Insert(m, shortname, shortnamelen, field_v, ctx->arena);
if (!ok) _upb_DefBuilder_OomErr(ctx);
if (strcmp(shortname, json_name) != 0 &&
bool skip_json_conflicts =
UPB_DESC(MessageOptions_deprecated_legacy_json_field_conflicts)(
upb_MessageDef_Options(m));
if (!skip_json_conflicts && strcmp(shortname, json_name) != 0 &&
UPB_DESC(FeatureSet_json_format)(m->resolved_features) ==
UPB_DESC(FeatureSet_ALLOW) &&
upb_strtable_lookup(&m->ntof, json_name, &v)) {
@ -15136,14 +15139,16 @@ void _upb_MessageDef_InsertField(upb_DefBuilder* ctx, upb_MessageDef* m,
}
if (upb_strtable_lookup(&m->jtof, json_name, &v)) {
_upb_DefBuilder_Errf(ctx, "duplicate json_name (%s)", json_name);
if (!skip_json_conflicts) {
_upb_DefBuilder_Errf(ctx, "duplicate json_name (%s)", json_name);
}
} else {
const size_t json_size = strlen(json_name);
ok = upb_strtable_insert(&m->jtof, json_name, json_size,
upb_value_constptr(f), ctx->arena);
if (!ok) _upb_DefBuilder_OomErr(ctx);
}
const size_t json_size = strlen(json_name);
ok = upb_strtable_insert(&m->jtof, json_name, json_size,
upb_value_constptr(f), ctx->arena);
if (!ok) _upb_DefBuilder_OomErr(ctx);
if (upb_inttable_lookup(&m->itof, field_number, NULL)) {
_upb_DefBuilder_Errf(ctx, "duplicate field number (%u)", field_number);
}

@ -14640,7 +14640,10 @@ void _upb_MessageDef_InsertField(upb_DefBuilder* ctx, upb_MessageDef* m,
_upb_MessageDef_Insert(m, shortname, shortnamelen, field_v, ctx->arena);
if (!ok) _upb_DefBuilder_OomErr(ctx);
if (strcmp(shortname, json_name) != 0 &&
bool skip_json_conflicts =
UPB_DESC(MessageOptions_deprecated_legacy_json_field_conflicts)(
upb_MessageDef_Options(m));
if (!skip_json_conflicts && strcmp(shortname, json_name) != 0 &&
UPB_DESC(FeatureSet_json_format)(m->resolved_features) ==
UPB_DESC(FeatureSet_ALLOW) &&
upb_strtable_lookup(&m->ntof, json_name, &v)) {
@ -14650,14 +14653,16 @@ void _upb_MessageDef_InsertField(upb_DefBuilder* ctx, upb_MessageDef* m,
}
if (upb_strtable_lookup(&m->jtof, json_name, &v)) {
_upb_DefBuilder_Errf(ctx, "duplicate json_name (%s)", json_name);
if (!skip_json_conflicts) {
_upb_DefBuilder_Errf(ctx, "duplicate json_name (%s)", json_name);
}
} else {
const size_t json_size = strlen(json_name);
ok = upb_strtable_insert(&m->jtof, json_name, json_size,
upb_value_constptr(f), ctx->arena);
if (!ok) _upb_DefBuilder_OomErr(ctx);
}
const size_t json_size = strlen(json_name);
ok = upb_strtable_insert(&m->jtof, json_name, json_size,
upb_value_constptr(f), ctx->arena);
if (!ok) _upb_DefBuilder_OomErr(ctx);
if (upb_inttable_lookup(&m->itof, field_number, NULL)) {
_upb_DefBuilder_Errf(ctx, "duplicate field number (%u)", field_number);
}

Loading…
Cancel
Save