summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2010-12-07 14:50:13 -0700
committerKarl Williamson <public@khwilliamson.com>2010-12-11 15:57:31 -0700
commitce1c68b24a719356e8e7724a2c8a963159f3c18d (patch)
treef93454544152efe45925f23dacdb1d0cb88480d2 /regcomp.c
parent41b0f1c13ae23011b37421cd90820bc780b74f30 (diff)
downloadperl-ce1c68b24a719356e8e7724a2c8a963159f3c18d.tar.gz
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
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/regcomp.c b/regcomp.c
index cca4a4d74a..d493b5b811 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 */