From ce1c68b24a719356e8e7724a2c8a963159f3c18d Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Tue, 7 Dec 2010 14:50:13 -0700 Subject: [PATCH] regcomp.c: isASCII doesn't match outside ANYOF bitmap So there is no need to tell regexec that it does, and then can combine two other statements --- regcomp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/regcomp.c b/regcomp.c index cca4a4d..d493b5b 100644 --- a/regcomp.c +++ b/regcomp.c @@ -8677,7 +8677,8 @@ parseit: S_set_regclass_bit(aTHX_ pRExC_state, ret, ASCII_TO_NATIVE(value)); } yesno = '+'; - what = "ASCII"; + what = NULL; /* Doesn't match outside ascii, so + don't want to add +utf8:: */ break; case ANYOF_NASCII: if (LOC) @@ -8727,12 +8728,9 @@ parseit: if (what) { /* Strings such as "+utf8::isWord\n" */ Perl_sv_catpvf(aTHX_ listsv, "%cutf8::Is%s\n", yesno, what); - } - - /* All but ASCII can match characters storable only in utf8 */ - if (namedclass != ANYOF_ASCII) { ANYOF_FLAGS(ret) |= ANYOF_UTF8; } + continue; } } /* end of namedclass \blah */ -- 1.8.3.1