Skip to content

Commit 8c90d3a

Browse files
committed
intrpvar.h: Add variable for use in tr///
This is part of this branch of changes.
1 parent 58a0d04 commit 8c90d3a

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

embedvar.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
#define PL_Sock (vTHX->ISock)
5959
#define PL_StdIO (vTHX->IStdIO)
6060
#define PL_Sv (vTHX->ISv)
61+
#define PL_TR_SPECIAL_HANDLING_UTF8 (vTHX->ITR_SPECIAL_HANDLING_UTF8)
6162
#define PL_Xpv (vTHX->IXpv)
6263
#define PL_an (vTHX->Ian)
6364
#define PL_argvgv (vTHX->Iargvgv)

intrpvar.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,8 @@ PERLVARI(I, dump_re_max_len, STRLEN, 60)
900900

901901
PERLVAR(I, internal_random_state, PL_RANDOM_STATE_TYPE)
902902

903+
PERLVARA(I, TR_SPECIAL_HANDLING_UTF8, UTF8_MAXBYTES, char)
904+
903905
/* If you are adding a U8 or U16, check to see if there are 'Space' comments
904906
* above on where there are gaps which currently will be structure padding. */
905907

perl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,9 @@ perl_construct(pTHXx)
299299
STATUS_ALL_SUCCESS;
300300

301301
init_uniprops();
302+
(void) uvchr_to_utf8_flags((U8 *) PL_TR_SPECIAL_HANDLING_UTF8,
303+
TR_SPECIAL_HANDLING,
304+
UNICODE_ALLOW_ABOVE_IV_MAX);
302305

303306
#if defined(LOCAL_PATCH_COUNT)
304307
PL_localpatches = local_patches; /* For possible -v */

0 commit comments

Comments
 (0)