File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -1065,13 +1065,18 @@ this macro matches
1065
1065
#define UTF_START_BYTE_110000_ UTF_START_BYTE(PERL_UNICODE_MAX + 1, 21)
1066
1066
#define UTF_FIRST_CONT_BYTE_110000_ \
1067
1067
UTF_FIRST_CONT_BYTE(PERL_UNICODE_MAX + 1, 21)
1068
+
1069
+ /* Internal macro when we don't care about it being well-formed, and know we
1070
+ * have two bytes available to read */
1071
+ #define UTF8_IS_SUPER_NO_CHECK_ (s ) \
1072
+ ( NATIVE_UTF8_TO_I8(s[0]) >= UTF_START_BYTE_110000_ \
1073
+ && ( NATIVE_UTF8_TO_I8(s[0]) > UTF_START_BYTE_110000_ \
1074
+ || NATIVE_UTF8_TO_I8(s[1]) >= UTF_FIRST_CONT_BYTE_110000_))
1075
+
1068
1076
#define UTF8_IS_SUPER (s , e ) \
1069
- ( ((e) - (s)) >= UNISKIP_BY_MSB_(20) \
1070
- && ( NATIVE_UTF8_TO_I8(s[0]) >= UTF_START_BYTE_110000_ \
1071
- && ( NATIVE_UTF8_TO_I8(s[0]) > UTF_START_BYTE_110000_ \
1072
- || NATIVE_UTF8_TO_I8(s[1]) >= UTF_FIRST_CONT_BYTE_110000_))) \
1077
+ ((((e) - (s)) >= UNISKIP_BY_MSB_(20) && UTF8_IS_SUPER_NO_CHECK_(s)) \
1073
1078
? isUTF8_CHAR(s, e) \
1074
- : 0
1079
+ : 0)
1075
1080
1076
1081
/*
1077
1082
=for apidoc Am|bool|UNICODE_IS_NONCHAR|const UV uv
You can’t perform that action at this time.
0 commit comments