Skip to content

Commit db9cc39

Browse files
Auto-generate files after cl/614707625
1 parent e1a19ba commit db9cc39

File tree

4 files changed

+48
-34
lines changed

4 files changed

+48
-34
lines changed

php/ext/google/protobuf/php-upb.c

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5704,7 +5704,8 @@ bool upb_Message_IsEmpty(const upb_Message* msg, const upb_MiniTable* m) {
57045704
}
57055705

57065706
static bool _upb_Array_IsEqual(const upb_Array* arr1, const upb_Array* arr2,
5707-
upb_CType ctype, const upb_MiniTable* m) {
5707+
upb_CType ctype, const upb_MiniTable* m,
5708+
int options) {
57085709
// Check for trivial equality.
57095710
if (arr1 == arr2) return true;
57105711

@@ -5717,14 +5718,14 @@ static bool _upb_Array_IsEqual(const upb_Array* arr1, const upb_Array* arr2,
57175718
const upb_MessageValue val1 = upb_Array_Get(arr1, i);
57185719
const upb_MessageValue val2 = upb_Array_Get(arr2, i);
57195720

5720-
if (!upb_MessageValue_IsEqual(val1, val2, ctype, m)) return false;
5721+
if (!upb_MessageValue_IsEqual(val1, val2, ctype, m, options)) return false;
57215722
}
57225723

57235724
return true;
57245725
}
57255726

57265727
static bool _upb_Map_IsEqual(const upb_Map* map1, const upb_Map* map2,
5727-
const upb_MiniTable* m) {
5728+
const upb_MiniTable* m, int options) {
57285729
// Check for trivial equality.
57295730
if (map1 == map2) return true;
57305731

@@ -5741,15 +5742,17 @@ static bool _upb_Map_IsEqual(const upb_Map* map1, const upb_Map* map2,
57415742
size_t iter = kUpb_Map_Begin;
57425743
while (upb_Map_Next(map1, &key, &val1, &iter)) {
57435744
if (!upb_Map_Get(map2, key, &val2)) return false;
5744-
if (!upb_MessageValue_IsEqual(val1, val2, ctype, m2_value)) return false;
5745+
if (!upb_MessageValue_IsEqual(val1, val2, ctype, m2_value, options))
5746+
return false;
57455747
}
57465748

57475749
return true;
57485750
}
57495751

57505752
static bool _upb_Message_BaseFieldsAreEqual(const upb_Message* msg1,
57515753
const upb_Message* msg2,
5752-
const upb_MiniTable* m) {
5754+
const upb_MiniTable* m,
5755+
int options) {
57535756
// Iterate over all base fields for each message.
57545757
// The order will always match if the messages are equal.
57555758
size_t iter1 = kUpb_BaseField_Begin;
@@ -5772,13 +5775,14 @@ static bool _upb_Message_BaseFieldsAreEqual(const upb_Message* msg1,
57725775
bool eq;
57735776
switch (UPB_PRIVATE(_upb_MiniTableField_Mode)(f1)) {
57745777
case kUpb_FieldMode_Array:
5775-
eq = _upb_Array_IsEqual(val1.array_val, val2.array_val, ctype, subm);
5778+
eq = _upb_Array_IsEqual(val1.array_val, val2.array_val, ctype, subm,
5779+
options);
57765780
break;
57775781
case kUpb_FieldMode_Map:
5778-
eq = _upb_Map_IsEqual(val1.map_val, val2.map_val, subm);
5782+
eq = _upb_Map_IsEqual(val1.map_val, val2.map_val, subm, options);
57795783
break;
57805784
case kUpb_FieldMode_Scalar:
5781-
eq = upb_MessageValue_IsEqual(val1, val2, ctype, subm);
5785+
eq = upb_MessageValue_IsEqual(val1, val2, ctype, subm, options);
57825786
break;
57835787
}
57845788
if (!eq) return false;
@@ -5787,7 +5791,8 @@ static bool _upb_Message_BaseFieldsAreEqual(const upb_Message* msg1,
57875791

57885792
static bool _upb_Message_ExtensionsAreEqual(const upb_Message* msg1,
57895793
const upb_Message* msg2,
5790-
const upb_MiniTable* m) {
5794+
const upb_MiniTable* m,
5795+
int options) {
57915796
// Must have identical extension counts.
57925797
if (upb_Message_ExtensionCount(msg1) != upb_Message_ExtensionCount(msg2)) {
57935798
return false;
@@ -5812,13 +5817,14 @@ static bool _upb_Message_ExtensionsAreEqual(const upb_Message* msg1,
58125817
bool eq;
58135818
switch (UPB_PRIVATE(_upb_MiniTableField_Mode)(f)) {
58145819
case kUpb_FieldMode_Array:
5815-
eq = _upb_Array_IsEqual(val1.array_val, val2.array_val, ctype, subm);
5820+
eq = _upb_Array_IsEqual(val1.array_val, val2.array_val, ctype, subm,
5821+
options);
58165822
break;
58175823
case kUpb_FieldMode_Map:
58185824
UPB_UNREACHABLE(); // Maps cannot be extensions.
58195825
break;
58205826
case kUpb_FieldMode_Scalar: {
5821-
eq = upb_MessageValue_IsEqual(val1, val2, ctype, subm);
5827+
eq = upb_MessageValue_IsEqual(val1, val2, ctype, subm, options);
58225828
break;
58235829
}
58245830
}
@@ -5828,11 +5834,11 @@ static bool _upb_Message_ExtensionsAreEqual(const upb_Message* msg1,
58285834
}
58295835

58305836
bool upb_Message_IsEqual(const upb_Message* msg1, const upb_Message* msg2,
5831-
const upb_MiniTable* m) {
5837+
const upb_MiniTable* m, int options) {
58325838
if (UPB_UNLIKELY(msg1 == msg2)) return true;
58335839

5834-
if (!_upb_Message_BaseFieldsAreEqual(msg1, msg2, m)) return false;
5835-
if (!_upb_Message_ExtensionsAreEqual(msg1, msg2, m)) return false;
5840+
if (!_upb_Message_BaseFieldsAreEqual(msg1, msg2, m, options)) return false;
5841+
if (!_upb_Message_ExtensionsAreEqual(msg1, msg2, m, options)) return false;
58365842

58375843
// Check the unknown fields.
58385844
size_t usize1, usize2;

php/ext/google/protobuf/php-upb.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12734,13 +12734,14 @@ UPB_API bool upb_Message_IsEmpty(const upb_Message* msg,
1273412734

1273512735
UPB_API bool upb_Message_IsEqual(const upb_Message* msg1,
1273612736
const upb_Message* msg2,
12737-
const upb_MiniTable* m);
12737+
const upb_MiniTable* m, int options);
1273812738

1273912739
// If |ctype| is a message then |m| must point to its minitable.
1274012740
UPB_API_INLINE bool upb_MessageValue_IsEqual(upb_MessageValue val1,
1274112741
upb_MessageValue val2,
1274212742
upb_CType ctype,
12743-
const upb_MiniTable* m) {
12743+
const upb_MiniTable* m,
12744+
int options) {
1274412745
switch (ctype) {
1274512746
case kUpb_CType_Bool:
1274612747
return val1.bool_val == val2.bool_val;
@@ -12761,7 +12762,7 @@ UPB_API_INLINE bool upb_MessageValue_IsEqual(upb_MessageValue val1,
1276112762
return upb_StringView_IsEqual(val1.str_val, val2.str_val);
1276212763

1276312764
case kUpb_CType_Message:
12764-
return upb_Message_IsEqual(val1.msg_val, val2.msg_val, m);
12765+
return upb_Message_IsEqual(val1.msg_val, val2.msg_val, m, options);
1276512766

1276612767
default:
1276712768
UPB_UNREACHABLE();

ruby/ext/google/protobuf_c/ruby-upb.c

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5218,7 +5218,8 @@ bool upb_Message_IsEmpty(const upb_Message* msg, const upb_MiniTable* m) {
52185218
}
52195219

52205220
static bool _upb_Array_IsEqual(const upb_Array* arr1, const upb_Array* arr2,
5221-
upb_CType ctype, const upb_MiniTable* m) {
5221+
upb_CType ctype, const upb_MiniTable* m,
5222+
int options) {
52225223
// Check for trivial equality.
52235224
if (arr1 == arr2) return true;
52245225

@@ -5231,14 +5232,14 @@ static bool _upb_Array_IsEqual(const upb_Array* arr1, const upb_Array* arr2,
52315232
const upb_MessageValue val1 = upb_Array_Get(arr1, i);
52325233
const upb_MessageValue val2 = upb_Array_Get(arr2, i);
52335234

5234-
if (!upb_MessageValue_IsEqual(val1, val2, ctype, m)) return false;
5235+
if (!upb_MessageValue_IsEqual(val1, val2, ctype, m, options)) return false;
52355236
}
52365237

52375238
return true;
52385239
}
52395240

52405241
static bool _upb_Map_IsEqual(const upb_Map* map1, const upb_Map* map2,
5241-
const upb_MiniTable* m) {
5242+
const upb_MiniTable* m, int options) {
52425243
// Check for trivial equality.
52435244
if (map1 == map2) return true;
52445245

@@ -5255,15 +5256,17 @@ static bool _upb_Map_IsEqual(const upb_Map* map1, const upb_Map* map2,
52555256
size_t iter = kUpb_Map_Begin;
52565257
while (upb_Map_Next(map1, &key, &val1, &iter)) {
52575258
if (!upb_Map_Get(map2, key, &val2)) return false;
5258-
if (!upb_MessageValue_IsEqual(val1, val2, ctype, m2_value)) return false;
5259+
if (!upb_MessageValue_IsEqual(val1, val2, ctype, m2_value, options))
5260+
return false;
52595261
}
52605262

52615263
return true;
52625264
}
52635265

52645266
static bool _upb_Message_BaseFieldsAreEqual(const upb_Message* msg1,
52655267
const upb_Message* msg2,
5266-
const upb_MiniTable* m) {
5268+
const upb_MiniTable* m,
5269+
int options) {
52675270
// Iterate over all base fields for each message.
52685271
// The order will always match if the messages are equal.
52695272
size_t iter1 = kUpb_BaseField_Begin;
@@ -5286,13 +5289,14 @@ static bool _upb_Message_BaseFieldsAreEqual(const upb_Message* msg1,
52865289
bool eq;
52875290
switch (UPB_PRIVATE(_upb_MiniTableField_Mode)(f1)) {
52885291
case kUpb_FieldMode_Array:
5289-
eq = _upb_Array_IsEqual(val1.array_val, val2.array_val, ctype, subm);
5292+
eq = _upb_Array_IsEqual(val1.array_val, val2.array_val, ctype, subm,
5293+
options);
52905294
break;
52915295
case kUpb_FieldMode_Map:
5292-
eq = _upb_Map_IsEqual(val1.map_val, val2.map_val, subm);
5296+
eq = _upb_Map_IsEqual(val1.map_val, val2.map_val, subm, options);
52935297
break;
52945298
case kUpb_FieldMode_Scalar:
5295-
eq = upb_MessageValue_IsEqual(val1, val2, ctype, subm);
5299+
eq = upb_MessageValue_IsEqual(val1, val2, ctype, subm, options);
52965300
break;
52975301
}
52985302
if (!eq) return false;
@@ -5301,7 +5305,8 @@ static bool _upb_Message_BaseFieldsAreEqual(const upb_Message* msg1,
53015305

53025306
static bool _upb_Message_ExtensionsAreEqual(const upb_Message* msg1,
53035307
const upb_Message* msg2,
5304-
const upb_MiniTable* m) {
5308+
const upb_MiniTable* m,
5309+
int options) {
53055310
// Must have identical extension counts.
53065311
if (upb_Message_ExtensionCount(msg1) != upb_Message_ExtensionCount(msg2)) {
53075312
return false;
@@ -5326,13 +5331,14 @@ static bool _upb_Message_ExtensionsAreEqual(const upb_Message* msg1,
53265331
bool eq;
53275332
switch (UPB_PRIVATE(_upb_MiniTableField_Mode)(f)) {
53285333
case kUpb_FieldMode_Array:
5329-
eq = _upb_Array_IsEqual(val1.array_val, val2.array_val, ctype, subm);
5334+
eq = _upb_Array_IsEqual(val1.array_val, val2.array_val, ctype, subm,
5335+
options);
53305336
break;
53315337
case kUpb_FieldMode_Map:
53325338
UPB_UNREACHABLE(); // Maps cannot be extensions.
53335339
break;
53345340
case kUpb_FieldMode_Scalar: {
5335-
eq = upb_MessageValue_IsEqual(val1, val2, ctype, subm);
5341+
eq = upb_MessageValue_IsEqual(val1, val2, ctype, subm, options);
53365342
break;
53375343
}
53385344
}
@@ -5342,11 +5348,11 @@ static bool _upb_Message_ExtensionsAreEqual(const upb_Message* msg1,
53425348
}
53435349

53445350
bool upb_Message_IsEqual(const upb_Message* msg1, const upb_Message* msg2,
5345-
const upb_MiniTable* m) {
5351+
const upb_MiniTable* m, int options) {
53465352
if (UPB_UNLIKELY(msg1 == msg2)) return true;
53475353

5348-
if (!_upb_Message_BaseFieldsAreEqual(msg1, msg2, m)) return false;
5349-
if (!_upb_Message_ExtensionsAreEqual(msg1, msg2, m)) return false;
5354+
if (!_upb_Message_BaseFieldsAreEqual(msg1, msg2, m, options)) return false;
5355+
if (!_upb_Message_ExtensionsAreEqual(msg1, msg2, m, options)) return false;
53505356

53515357
// Check the unknown fields.
53525358
size_t usize1, usize2;

ruby/ext/google/protobuf_c/ruby-upb.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12506,13 +12506,14 @@ UPB_API bool upb_Message_IsEmpty(const upb_Message* msg,
1250612506

1250712507
UPB_API bool upb_Message_IsEqual(const upb_Message* msg1,
1250812508
const upb_Message* msg2,
12509-
const upb_MiniTable* m);
12509+
const upb_MiniTable* m, int options);
1251012510

1251112511
// If |ctype| is a message then |m| must point to its minitable.
1251212512
UPB_API_INLINE bool upb_MessageValue_IsEqual(upb_MessageValue val1,
1251312513
upb_MessageValue val2,
1251412514
upb_CType ctype,
12515-
const upb_MiniTable* m) {
12515+
const upb_MiniTable* m,
12516+
int options) {
1251612517
switch (ctype) {
1251712518
case kUpb_CType_Bool:
1251812519
return val1.bool_val == val2.bool_val;
@@ -12533,7 +12534,7 @@ UPB_API_INLINE bool upb_MessageValue_IsEqual(upb_MessageValue val1,
1253312534
return upb_StringView_IsEqual(val1.str_val, val2.str_val);
1253412535

1253512536
case kUpb_CType_Message:
12536-
return upb_Message_IsEqual(val1.msg_val, val2.msg_val, m);
12537+
return upb_Message_IsEqual(val1.msg_val, val2.msg_val, m, options);
1253712538

1253812539
default:
1253912540
UPB_UNREACHABLE();

0 commit comments

Comments
 (0)