Auto-generate files after cl/590961088
diff --git a/php/ext/google/protobuf/php-upb.h b/php/ext/google/protobuf/php-upb.h
index a485705..41900b7 100644
--- a/php/ext/google/protobuf/php-upb.h
+++ b/php/ext/google/protobuf/php-upb.h
@@ -13497,26 +13497,7 @@
UPB_INLINE
bool _upb_Decoder_VerifyUtf8Inline(const char* ptr, int len) {
- const char* end = ptr + len;
-
- // Check 8 bytes at a time for any non-ASCII char.
- while (end - ptr >= 8) {
- uint64_t data;
- memcpy(&data, ptr, 8);
- if (data & 0x8080808080808080) goto non_ascii;
- ptr += 8;
- }
-
- // Check one byte at a time for non-ASCII.
- while (ptr < end) {
- if (*ptr & 0x80) goto non_ascii;
- ptr++;
- }
-
- return true;
-
-non_ascii:
- return utf8_range2((const unsigned char*)ptr, end - ptr) == 0;
+ return utf8_range_IsValid(ptr, len);
}
const char* _upb_Decoder_CheckRequired(upb_Decoder* d, const char* ptr,
diff --git a/ruby/ext/google/protobuf_c/ruby-upb.h b/ruby/ext/google/protobuf_c/ruby-upb.h
index d7540da..d92ecc0 100755
--- a/ruby/ext/google/protobuf_c/ruby-upb.h
+++ b/ruby/ext/google/protobuf_c/ruby-upb.h
@@ -13316,26 +13316,7 @@
UPB_INLINE
bool _upb_Decoder_VerifyUtf8Inline(const char* ptr, int len) {
- const char* end = ptr + len;
-
- // Check 8 bytes at a time for any non-ASCII char.
- while (end - ptr >= 8) {
- uint64_t data;
- memcpy(&data, ptr, 8);
- if (data & 0x8080808080808080) goto non_ascii;
- ptr += 8;
- }
-
- // Check one byte at a time for non-ASCII.
- while (ptr < end) {
- if (*ptr & 0x80) goto non_ascii;
- ptr++;
- }
-
- return true;
-
-non_ascii:
- return utf8_range2((const unsigned char*)ptr, end - ptr) == 0;
+ return utf8_range_IsValid(ptr, len);
}
const char* _upb_Decoder_CheckRequired(upb_Decoder* d, const char* ptr,