summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-07-30 13:57:01 -0600
committerKarl Williamson <khw@cpan.org>2021-07-31 15:00:37 -0600
commit67260a96082ff542a79fd0bc3395144c94d5b958 (patch)
treec8e6961e2a71c8d4083015ffcaceef4c47c787c3 /utf8.c
parent6b28089cc4992fbc129d40723e0ce46f86abf4da (diff)
downloadperl-67260a96082ff542a79fd0bc3395144c94d5b958.tar.gz
regcharclass.h: Remove 2 EBCDIC dependencies
This commit makes is_HANGUL_ED_utf8_safe() return 0 unconditionally on EBCDIC platforms. This means its callers don't have to care what platform is running. Change the two callers to take advantage of this The commit also changes the description of the macro to be slightly more accurate
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/utf8.c b/utf8.c
index b93cbd87d6..bfc3c2a081 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1580,11 +1580,9 @@ Perl__utf8n_to_uvchr_msgs_helper(const U8 *s,
* syllables that the dfa doesn't properly handle. Quickly dispose of the
* final case. */
-#ifndef EBCDIC
-
/* Each of the affected Hanguls starts with \xED */
- if (is_HANGUL_ED_utf8_safe(s0, send)) {
+ if (is_HANGUL_ED_utf8_safe(s0, send)) { /* Always false on EBCDIC */
if (retlen) {
*retlen = 3;
}
@@ -1600,8 +1598,6 @@ Perl__utf8n_to_uvchr_msgs_helper(const U8 *s,
| (s0[2] & UTF_CONTINUATION_MASK);
}
-#endif
-
/* In conjunction with the exhaustive tests that can be enabled in
* APItest/t/utf8_warn_base.pl, this can make sure the dfa does precisely
* what it is intended to do, and that no flaws in it are masked by