summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2014-04-28 19:48:40 -0600
committerKarl Williamson <khw@cpan.org>2014-05-30 10:24:27 -0600
commit31667e6b38c3085889b2f81b2b68a91520d75e49 (patch)
treeff1e944e11b87287edc80dffb1a66118adbf3493 /regexec.c
parentb07262fd84b1e9ea4e247dfe6afa0f01f5bf0980 (diff)
downloadperl-31667e6b38c3085889b2f81b2b68a91520d75e49.tar.gz
regcomp.c, regexec.c: Move common code to a function
There are other cases where this functionality will be needed as well.
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/regexec.c b/regexec.c
index d4a7fdd3a8..32c446fd6e 100644
--- a/regexec.c
+++ b/regexec.c
@@ -3698,14 +3698,7 @@ S_setup_EXACTISH_ST_c1_c2(pTHX_ const regnode * const text_node, int *c1p,
/* Load the folds hash, if not already done */
SV** listp;
if (! PL_utf8_foldclosures) {
- if (! PL_utf8_tofold) {
- U8 dummy[UTF8_MAXBYTES_CASE+1];
-
- /* Force loading this by folding an above-Latin1 char */
- to_utf8_fold((U8*) HYPHEN_UTF8, dummy, NULL);
- assert(PL_utf8_tofold); /* Verify that worked */
- }
- PL_utf8_foldclosures = _swash_inversion_hash(PL_utf8_tofold);
+ _load_PL_utf8_foldclosures();
}
/* The fold closures data structure is a hash with the keys