Skip to content

Commit 5b86415

Browse files
committed
regexec.c: Refactor expanded macro from prev. commit
1 parent 5bac62c commit 5b86415

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

regexec.c

+13-10
Original file line numberDiff line numberDiff line change
@@ -6700,19 +6700,22 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
67006700
case ANYOF: /* /[abc]/ */
67016701
if (NEXTCHR_IS_EOS)
67026702
sayNO;
6703-
if (utf8_target && ! UTF8_IS_INVARIANT(*locinput)) {
6703+
if ( (! utf8_target || UTF8_IS_INVARIANT(*locinput))
6704+
&& ! ANYOF_FLAGS(scan))
6705+
{
6706+
if (! ANYOF_BITMAP_TEST(scan, * (U8 *) (locinput))) {
6707+
sayNO;
6708+
}
6709+
locinput++;
6710+
}
6711+
else {
67046712
if (!reginclass(rex, scan, (U8*)locinput, (U8*)reginfo->strend,
67056713
utf8_target))
6714+
{
67066715
sayNO;
6707-
locinput += UTF8SKIP(locinput);
6708-
}
6709-
else {
6710-
if (ANYOF_FLAGS(scan)
6711-
? ! reginclass(rex, scan, (U8*) locinput, (U8*) locinput+1, utf8_target)
6712-
: ! ANYOF_BITMAP_TEST(scan, *(U8*) locinput))
6713-
sayNO;
6714-
locinput++;
6715-
}
6716+
}
6717+
goto increment_locinput;
6718+
}
67166719
break;
67176720

67186721
case ANYOFM:

0 commit comments

Comments
 (0)