diff options
author | Karl Williamson <khw@cpan.org> | 2021-06-06 08:16:34 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-08-07 14:27:01 -0600 |
commit | 2d8dd9eb480c087d4be38eccb70dfcbb265548de (patch) | |
tree | 84c56b78192123a68a9444bcc739fd1c400f61a6 /handy.h | |
parent | 03abef4e914341bd78e7f70808ad55bd1da905cf (diff) | |
download | perl-2d8dd9eb480c087d4be38eccb70dfcbb265548de.tar.gz |
handy.h: Fix internal macro
I found this reading code. The macro is supposed to check for something
not being in the ASCII range, but instead checked that the input is
invariant under UTF-8. These concepts evaluate to the same thing on
ASCII platforms, but differently on EBCDIC ones. The calls to this
macro are such that there isn't a bug that surfaces here, but the code
generated is slightly different, and it should be fixed to prevent any
future issues.
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2237,7 +2237,7 @@ END_EXTERN_C * 'above_latin1' should include its arguments */ #define _generic_utf8_safe_no_upper_latin1(classnum, p, e, above_latin1) \ (__ASSERT_(_utf8_safe_assert(p, e)) \ - (UTF8_IS_INVARIANT(*(p))) \ + (isASCII(*(p))) \ ? _generic_isCC(*(p), classnum) \ : (UTF8_IS_DOWNGRADEABLE_START(*(p))) \ ? 0 /* Note that doesn't check validity for latin1 */ \ |