diff options
author | Karl Williamson <khw@cpan.org> | 2014-04-28 19:48:40 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2014-05-30 10:24:27 -0600 |
commit | 31667e6b38c3085889b2f81b2b68a91520d75e49 (patch) | |
tree | ff1e944e11b87287edc80dffb1a66118adbf3493 /regexec.c | |
parent | b07262fd84b1e9ea4e247dfe6afa0f01f5bf0980 (diff) | |
download | perl-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.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -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 |