diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-02-09 10:07:47 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-02-14 08:41:37 -0700 |
commit | 4e8910e0d628df764d87388af5830fb98b646135 (patch) | |
tree | 5feed1d89030949a521c447640f8de42d8d78ec8 /regexec.c | |
parent | 046c40559dca334dd19ab80f11964b107b2dbcef (diff) | |
download | perl-4e8910e0d628df764d87388af5830fb98b646135.tar.gz |
regexec.c: Give context for ANYOFV call
This converts one case where ANYOFV is now usable to allow it to match
more than one character.
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -6085,11 +6085,15 @@ S_regrepeat(pTHX_ const regexp *prog, const regnode *p, I32 max, int depth) break; case ANYOFV: case ANYOF: - if (utf8_target) { + if (utf8_target || OP(p) == ANYOFV) { + STRLEN inclasslen; loceol = PL_regeol; - while (hardcount < max && scan < loceol && - reginclass(prog, p, (U8*)scan, 0, utf8_target)) { - scan += UTF8SKIP(scan); + inclasslen = loceol - scan; + while (hardcount < max + && ((inclasslen = loceol - scan) > 0) + && reginclass(prog, p, (U8*)scan, &inclasslen, utf8_target)) + { + scan += inclasslen; hardcount++; } } else { |