diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-06-27 19:12:46 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-06-27 19:12:46 +0000 |
commit | b11f357e172c58160ed5ae754def443bbae9bacb (patch) | |
tree | 4e7d739e8d169c40c7ca48e161f17d7319cdcb00 /regexec.c | |
parent | c344f3872918f026026ddab0fdc6bb0ef0a5b4d0 (diff) | |
download | perl-b11f357e172c58160ed5ae754def443bbae9bacb.tar.gz |
Shave off some more of the Unicode regex slowness.
p4raw-id: //depot/perl@17371
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -4284,15 +4284,16 @@ Perl_regclass_swash(pTHX_ register regnode* node, bool doinit, SV** listsvp, SV if (PL_regdata->what[n] == 's') { SV *rv = (SV*)PL_regdata->data[n]; AV *av = (AV*)SvRV((SV*)rv); + SV **ary = AvARRAY(av); SV **a, **b; /* See the end of regcomp.c:S_reglass() for * documentation of these array elements. */ - si = *av_fetch(av, 0, FALSE); - a = av_fetch(av, 1, FALSE); - b = av_fetch(av, 2, FALSE); - + si = *ary; + a = SvTYPE(ary[1]) == SVt_RV ? &ary[1] : 0; + b = SvTYPE(ary[2]) == SVt_PVAV ? &ary[2] : 0; + if (a) sw = *a; else if (si && doinit) { |