regexec.c: Give context for ANYOFV call
authorKarl Williamson <public@khwilliamson.com>
Wed, 9 Feb 2011 17:34:02 +0000 (10:34 -0700)
committerKarl Williamson <public@khwilliamson.com>
Mon, 14 Feb 2011 15:41:37 +0000 (08:41 -0700)
This converts one case where ANYOFV is now usable to allow it to match
more than one character.

regexec.c

index 8886c25..58fc358 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -1465,10 +1465,9 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s,
        case ANYOFV:
        case ANYOF:
            if (utf8_target || OP(c) == ANYOFV) {
-                REXEC_FBC_UTF8_CLASS_SCAN((ANYOF_FLAGS(c) & ANYOF_NONBITMAP) ||
-                         !UTF8_IS_INVARIANT((U8)s[0]) ?
-                         reginclass(prog, c, (U8*)s, 0, utf8_target) :
-                         REGINCLASS(prog, c, (U8*)s));
+               STRLEN inclasslen = strend - s;
+               REXEC_FBC_UTF8_CLASS_SCAN(
+                          reginclass(prog, c, (U8*)s, &inclasslen, utf8_target));
            }
            else {
                 while (s < strend) {