#define STATIC static
#endif
+#define REGINCLASS(p,c) (ANYOF_FLAGS(p) ? reginclasslen(p,c,0,0) : ANYOF_BITMAP_TEST(p,*(c)))
+
/*
* Forwards.
*/
switch (OP(c)) {
case ANYOF:
while (s < strend) {
- STRLEN skip = do_utf8 ? UTF8SKIP(s) : 1;
-
- if (reginclass(c, (U8*)s, do_utf8) ||
+ STRLEN skip = do_utf8 ? UTF8SKIP(s) : 1;
+
+ if (do_utf8 ?
+ reginclasslen(c, (U8*)s, 0, do_utf8) :
+ REGINCLASS(c, (U8*)s) ||
(ANYOF_FOLD_SHARP_S(c, s, strend) &&
/* The assignment of 2 is intentional:
* for the sharp s, the skip is 2. */
tmp = doevery;
}
else
- tmp = 1;
+ tmp = 1;
s += skip;
}
break;
else {
if (nextchr < 0)
nextchr = UCHARAT(locinput);
- if (!reginclass(scan, (U8*)locinput, do_utf8))
+ if (!REGINCLASS(scan, (U8*)locinput))
sayNO_ANYOF;
if (!nextchr && locinput >= PL_regeol)
sayNO;
if (do_utf8) {
loceol = PL_regeol;
while (hardcount < max && scan < loceol &&
- reginclass(p, (U8*)scan, do_utf8)) {
+ reginclasslen(p, (U8*)scan, 0, do_utf8)) {
scan += UTF8SKIP(scan);
hardcount++;
}
} else {
- while (scan < loceol && reginclass(p, (U8*)scan, do_utf8))
+ while (scan < loceol && REGINCLASS(p, (U8*)scan))
scan++;
}
break;