summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-10-02 22:34:37 -0600
committerKarl Williamson <khw@cpan.org>2019-11-06 21:22:24 -0700
commit8c90d3a9c79a9471ef12dde584263fc38571cf46 (patch)
tree758fc8dac38750475f4a7feb5413c57d59e9e275
parent58a0d047aa9b5d14eab60e85a550efa918a92018 (diff)
downloadperl-8c90d3a9c79a9471ef12dde584263fc38571cf46.tar.gz
intrpvar.h: Add variable for use in tr///
This is part of this branch of changes.
-rw-r--r--embedvar.h1
-rw-r--r--intrpvar.h2
-rw-r--r--perl.c3
3 files changed, 6 insertions, 0 deletions
diff --git a/embedvar.h b/embedvar.h
index 259a534965..120e5f72da 100644
--- a/embedvar.h
+++ b/embedvar.h
@@ -58,6 +58,7 @@
#define PL_Sock (vTHX->ISock)
#define PL_StdIO (vTHX->IStdIO)
#define PL_Sv (vTHX->ISv)
+#define PL_TR_SPECIAL_HANDLING_UTF8 (vTHX->ITR_SPECIAL_HANDLING_UTF8)
#define PL_Xpv (vTHX->IXpv)
#define PL_an (vTHX->Ian)
#define PL_argvgv (vTHX->Iargvgv)
diff --git a/intrpvar.h b/intrpvar.h
index e28726b8fa..94ac64717a 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -900,6 +900,8 @@ PERLVARI(I, dump_re_max_len, STRLEN, 60)
PERLVAR(I, internal_random_state, PL_RANDOM_STATE_TYPE)
+PERLVARA(I, TR_SPECIAL_HANDLING_UTF8, UTF8_MAXBYTES, char)
+
/* If you are adding a U8 or U16, check to see if there are 'Space' comments
* above on where there are gaps which currently will be structure padding. */
diff --git a/perl.c b/perl.c
index cad0e2212d..d14da14925 100644
--- a/perl.c
+++ b/perl.c
@@ -299,6 +299,9 @@ perl_construct(pTHXx)
STATUS_ALL_SUCCESS;
init_uniprops();
+ (void) uvchr_to_utf8_flags((U8 *) PL_TR_SPECIAL_HANDLING_UTF8,
+ TR_SPECIAL_HANDLING,
+ UNICODE_ALLOW_ABOVE_IV_MAX);
#if defined(LOCAL_PATCH_COUNT)
PL_localpatches = local_patches; /* For possible -v */