diff options
author | Karl Williamson <public@khwilliamson.com> | 2013-08-15 10:59:01 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-09-24 11:36:16 -0600 |
commit | 01822b745cf22c5f129312061022b109fc43bf61 (patch) | |
tree | db411a54c7ad632570e9a8c635608b3d0b1181c1 | |
parent | 81c80d3d62803334acb37662199774c9bd6ccf5c (diff) | |
download | perl-01822b745cf22c5f129312061022b109fc43bf61.tar.gz |
Remove PL_ASCII; use existing array slots for it
PL_ASCII contains an inversion list to match the ASCII-range code
points. It is unusable outside the core regular expression code because
all the functions that manipulate inversion lists are defined only
within a few core files. Therefore no outside code should be depending
on it.
It turns out that there are arrays of similar inversion lists, and these
all have slots which should have this inversion list in them. This
commit fills them, instead of using PL_ASCII.
-rw-r--r-- | embedvar.h | 1 | ||||
-rw-r--r-- | intrpvar.h | 1 | ||||
-rw-r--r-- | regcomp.c | 7 | ||||
-rw-r--r-- | sv.c | 1 |
4 files changed, 5 insertions, 5 deletions
diff --git a/embedvar.h b/embedvar.h index 2349c8c978..06d4e181a0 100644 --- a/embedvar.h +++ b/embedvar.h @@ -40,7 +40,6 @@ # define vTHX PERL_GET_INTERP # endif -#define PL_ASCII (vTHX->IASCII) #define PL_AboveLatin1 (vTHX->IAboveLatin1) #define PL_Argv (vTHX->IArgv) #define PL_Cmd (vTHX->ICmd) diff --git a/intrpvar.h b/intrpvar.h index 9cfe2c639d..3a8f959b3b 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -576,7 +576,6 @@ PERLVAR(I, numeric_radix_sv, SV *) /* The radix separator if not '.' */ #endif /* !USE_LOCALE_NUMERIC */ /* Unicode inversion lists */ -PERLVAR(I, ASCII, SV *) PERLVAR(I, Latin1, SV *) PERLVAR(I, UpperLatin1, SV *) /* Code points 128 - 255 */ PERLVAR(I, AboveLatin1, SV *) @@ -5545,10 +5545,13 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count, * having to test them each time otherwise */ if (! PL_AboveLatin1) { PL_AboveLatin1 = _new_invlist_C_array(AboveLatin1_invlist); - PL_ASCII = _new_invlist_C_array(ASCII_invlist); PL_Latin1 = _new_invlist_C_array(Latin1_invlist); PL_UpperLatin1 = _new_invlist_C_array(UpperLatin1_invlist); + PL_Posix_ptrs[_CC_ASCII] = _new_invlist_C_array(ASCII_invlist); + PL_L1Posix_ptrs[_CC_ASCII] = _new_invlist_C_array(ASCII_invlist); + PL_XPosix_ptrs[_CC_ASCII] = _new_invlist_C_array(ASCII_invlist); + PL_L1Posix_ptrs[_CC_ALPHANUMERIC] = _new_invlist_C_array(L1PosixAlnum_invlist); PL_Posix_ptrs[_CC_ALPHANUMERIC] @@ -12840,7 +12843,7 @@ parseit: #endif /* Not isascii(); just use the hard-coded definition for it */ _invlist_union_maybe_complement_2nd( posixes, - PL_ASCII, + PL_Posix_ptrs[_CC_ASCII], cBOOL(namedclass % 2), /* Complement if odd (NASCII) */ &posixes); @@ -13710,7 +13710,6 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, #endif /* !USE_LOCALE_NUMERIC */ /* Unicode inversion lists */ - PL_ASCII = sv_dup_inc(proto_perl->IASCII, param); PL_Latin1 = sv_dup_inc(proto_perl->ILatin1, param); PL_UpperLatin1 = sv_dup_inc(proto_perl->IUpperLatin1, param); PL_AboveLatin1 = sv_dup_inc(proto_perl->IAboveLatin1, param); |