summaryrefslogtreecommitdiff
path: root/utfebcdic.h
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 /utfebcdic.h
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 'utfebcdic.h')
-rw-r--r--utfebcdic.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/utfebcdic.h b/utfebcdic.h
index c852946f44..5912b3a142 100644
--- a/utfebcdic.h
+++ b/utfebcdic.h
@@ -171,8 +171,7 @@ END_EXTERN_C
(uv) < 0x400000 ? 5 : \
(uv) < 0x4000000 ? 6 : 7 )
-
-#define UNI_IS_INVARIANT(c) (((UV)(c)) < 0xA0)
+#define OFFUNI_IS_INVARIANT(c) (((UV)(c)) < 0xA0)
/* It turns out that on EBCDIC platforms, the invariants are the characters
* that have ASCII equivalents, plus the C1 controls. Since the C0 controls