summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-10-02 15:29:05 -0600
committerKarl Williamson <khw@cpan.org>2019-11-06 19:11:45 -0700
commit24b4c3036718873ce304c8bf491d5643364fa897 (patch)
treedfc56eae4ac954df51e27a7f006f893511852d4a /utf8.c
parenta9269870d0bdf863ca3ff8c0027e0894d4847393 (diff)
downloadperl-24b4c3036718873ce304c8bf491d5643364fa897.tar.gz
Allow core to work with code points above IV_MAX
Higher has been reserved for core use, and a future commit will want to finally do this.
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/utf8.c b/utf8.c
index 911214505b..6b98473fb3 100644
--- a/utf8.c
+++ b/utf8.c
@@ -324,7 +324,9 @@ Perl_uvoffuni_to_utf8_flags_msgs(pTHX_ U8 *d, UV uv, const UV flags, HV** msgs)
* performance hit on these high EBCDIC code points. */
if (UNLIKELY(UNICODE_IS_SUPER(uv))) {
- if (UNLIKELY(uv > MAX_LEGAL_CP)) {
+ if (UNLIKELY( uv > MAX_LEGAL_CP
+ && ! (flags & UNICODE_ALLOW_ABOVE_IV_MAX)))
+ {
Perl_croak(aTHX_ cp_above_legal_max, uv, MAX_LEGAL_CP);
}
if ( (flags & UNICODE_WARN_SUPER)