diff options
author | Karl Williamson <khw@cpan.org> | 2015-12-26 12:35:32 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2015-12-26 12:57:41 -0700 |
commit | c286c389b9042dbcef4d300c4faacf7efc8f6e75 (patch) | |
tree | 1ecc8d82b21b9784e3cd45642177da5b324f1a95 | |
parent | 428c1aff5a0e12f06706ffce0a395e4123d8965e (diff) | |
download | perl-c286c389b9042dbcef4d300c4faacf7efc8f6e75.tar.gz |
regexec.c: Avoid a function call
Not infrequently, a UTF-8 string will contain ASCII. In this case, by
adding a test for this we can avoid the function call that is needed for
more complicated cases.
-rw-r--r-- | regexec.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -5775,7 +5775,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog) case ANYOF: /* /[abc]/ */ if (NEXTCHR_IS_EOS) sayNO; - if (utf8_target) { + if (utf8_target && ! UTF8_IS_INVARIANT(locinput)) { if (!reginclass(rex, scan, (U8*)locinput, (U8*)reginfo->strend, utf8_target)) sayNO; |