diff options
author | Karl Williamson <khw@cpan.org> | 2019-10-18 15:09:21 -0700 |
---|---|---|
committer | Nicolas R <atoomic@cpan.org> | 2019-11-08 12:01:13 -0700 |
commit | 1d48ad080c1a0706151344cac94b65c5335a5f36 (patch) | |
tree | d58c343eed8d7a18d2ae64ed1051e1edbf03d428 /dist/Devel-PPPort | |
parent | 6817ec2eb60c9787d4641ba7a81fed379bce6169 (diff) | |
download | perl-1d48ad080c1a0706151344cac94b65c5335a5f36.tar.gz |
Can test isASCII_utf8_safe to earlier
This doesn't really depend on any UTF-8, so by slightly rewriting it, we
can backport it earlier.
(cherry picked from commit 621fa67cacff3079f35a57baf2bd737b03158601)
Signed-off-by: Nicolas R <atoomic@cpan.org>
Diffstat (limited to 'dist/Devel-PPPort')
-rw-r--r-- | dist/Devel-PPPort/parts/inc/misc | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/dist/Devel-PPPort/parts/inc/misc b/dist/Devel-PPPort/parts/inc/misc index 03dd58a238..f822b15d15 100644 --- a/dist/Devel-PPPort/parts/inc/misc +++ b/dist/Devel-PPPort/parts/inc/misc @@ -615,7 +615,7 @@ __UNDEFINED__ isUPPER_A(c) isUPPER(c) __UNDEFINED__ isWORDCHAR_A(c) isWORDCHAR(c) __UNDEFINED__ isXDIGIT_A(c) isXDIGIT(c) -__UNDEFINED__ isASCII_utf8_safe(s,e) isASCII(*(s)) +__UNDEFINED__ isASCII_utf8_safe(s,e) (((e) - (s)) <= 0 ? 0 : isASCII(*(s))) #if { VERSION >= 5.006 } @@ -1690,32 +1690,32 @@ isPSXSPC_L1(ord) OUTPUT: RETVAL -#if { VERSION >= 5.006 } - bool -isALPHA_utf8_safe(s, offset) +isASCII_utf8_safe(s, offset) unsigned char * s int offset CODE: - RETVAL = isALPHA_utf8_safe(s, s + UTF8SKIP(s) + offset); + RETVAL = isASCII_utf8_safe(s, s + 1 + offset); OUTPUT: RETVAL +#if { VERSION >= 5.006 } + bool -isALPHANUMERIC_utf8_safe(s, offset) +isALPHA_utf8_safe(s, offset) unsigned char * s int offset CODE: - RETVAL = isALPHANUMERIC_utf8_safe(s, s + UTF8SKIP(s) + offset); + RETVAL = isALPHA_utf8_safe(s, s + UTF8SKIP(s) + offset); OUTPUT: RETVAL bool -isASCII_utf8_safe(s, offset) +isALPHANUMERIC_utf8_safe(s, offset) unsigned char * s int offset CODE: - RETVAL = isASCII_utf8_safe(s, s + UTF8SKIP(s) + offset); + RETVAL = isALPHANUMERIC_utf8_safe(s, s + UTF8SKIP(s) + offset); OUTPUT: RETVAL @@ -1845,10 +1845,6 @@ isXDIGIT_utf8_safe(s, offset) OUTPUT: RETVAL -#endif - -#ifdef UTF8SKIP - AV * toLOWER_utf8_safe(s, offset) unsigned char * s |