From: Karl Williamson Date: Thu, 28 Jun 2012 23:13:18 +0000 (-0600) Subject: regcomp.c: Only try to fold foldable chars X-Git-Tag: upstream/5.20.0~6030^2~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea220d7046e366205eb43703638d640baba2805e;p=platform%2Fupstream%2Fperl.git regcomp.c: Only try to fold foldable chars This uses the new table that a previous commit caused mktables to generate which more precisely determines which Unicode characters participate in folds. This avoids trying to calculate a fold that we can know beforehand doesn't have a fold. --- diff --git a/regcomp.c b/regcomp.c index adeec44..b2c1f5c 100644 --- a/regcomp.c +++ b/regcomp.c @@ -11881,10 +11881,12 @@ parseit: } else { - /* This is a list of all the characters that participate in folds - * (except marks, etc in multi-char folds */ + /* Here, there are non-Latin1 code points, so we will have to go + * fetch the list of all the characters that participate in folds + */ if (! PL_utf8_foldable) { - SV* swash = swash_init("utf8", "Cased", &PL_sv_undef, 1, 0); + SV* swash = swash_init("utf8", "_Perl_Any_Folds", + &PL_sv_undef, 1, 0); PL_utf8_foldable = _swash_to_invlist(swash); SvREFCNT_dec(swash); }