summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-03-29 16:32:49 -0600
committerKarl Williamson <khw@cpan.org>2018-03-31 15:36:46 -0600
commitb74fe592196bcf9f41b2e13d774c2c6513a650df (patch)
tree9f90d065de465962410e8f0c88529939b7ce22a7 /perl.c
parentd2aadf62cbb988487f162551df71b8a36cb54fb6 (diff)
downloadperl-b74fe592196bcf9f41b2e13d774c2c6513a650df.tar.gz
Use compiled-in C structure for inverted case folds
This commit changes to use the C data structures generated by the previous commit to compute what characters fold to a given one. This is used to find out what things should match under /i. This now avoids the expensive start up cost of switching to perl utf8_heavy.pl, loading a file from disk, and constructing a hash from it.
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/perl.c b/perl.c
index 2a3df3dc85..6fb2cc6acd 100644
--- a/perl.c
+++ b/perl.c
@@ -336,6 +336,7 @@ perl_construct(pTHXx)
NonL1_Perl_Non_Final_Folds_invlist);
PL_utf8_charname_begin = _new_invlist_C_array(_Perl_Charname_Begin_invlist);
PL_utf8_charname_continue = _new_invlist_C_array(_Perl_Charname_Continue_invlist);
+ PL_utf8_foldclosures = _new_invlist_C_array(_Perl_IVCF_invlist);
#if defined(LOCAL_PATCH_COUNT)
@@ -1206,13 +1207,11 @@ perl_destruct(pTHXx)
/* clear character classes */
SvREFCNT_dec(PL_utf8_mark);
- SvREFCNT_dec(PL_utf8_foldclosures);
SvREFCNT_dec(PL_InBitmap);
#ifdef USE_LOCALE_CTYPE
SvREFCNT_dec(PL_warn_locale);
#endif
PL_utf8_mark = NULL;
- PL_utf8_foldclosures = NULL;
PL_InBitmap = NULL;
#ifdef USE_LOCALE_CTYPE
PL_warn_locale = NULL;