summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-08-02 21:20:44 -0600
committerKarl Williamson <khw@cpan.org>2015-09-18 13:26:12 -0600
commit2d1545e53e75b1c3ae16ad055ae011e2e015e0c3 (patch)
treeb1046aff7670fc62d2bd7e563bd4220bd3261358 /toke.c
parent6916a94cde40f03bd33b3b63bf26ad8d48b399fd (diff)
downloadperl-2d1545e53e75b1c3ae16ad055ae011e2e015e0c3.tar.gz
Change meaning of UNI_IS_INVARIANT on EBCDIC platforms
This should make more CPAN and other code work without change. Usually, unwittingly, code that says UNI_IS_INVARIANT means to use the native platform code values for code points below 256, so acquiesce to the expected meaning and make the macro correspond. Since the native values on ASCII machines are the same as Unicode, this change doesn't affect code running on them. A new macro, OFFUNI_IS_INVARIANT, is created for those few places that really do want a Unicode value. There are just a few places in the Perl core like that, which this commit changes.
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index 1b7860acdc..b1bdfad9c8 100644
--- a/toke.c
+++ b/toke.c
@@ -3525,7 +3525,7 @@ S_scan_const(pTHX_ char *start)
}
/* Add the (Unicode) code point to the output. */
- if (UNI_IS_INVARIANT(uv)) {
+ if (OFFUNI_IS_INVARIANT(uv)) {
*d++ = (char) LATIN1_TO_NATIVE(uv);
}
else {