summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-03-16 11:49:48 -0600
committerKarl Williamson <public@khwilliamson.com>2011-03-16 20:56:27 -0600
commitbcc0256f98811a88bfdf8444f309ce60909d3bc1 (patch)
treed0234bd0840ba68c7bb9fa1be75282e0d6cd8cb6 /regcomp.c
parent871d0d1aa0b41dbd74400c89ecc7738ea63f6594 (diff)
downloadperl-bcc0256f98811a88bfdf8444f309ce60909d3bc1.tar.gz
regcomp.c: \D and \d should work under locale
A number of earlier commits have fixed various places where the code assumed that digits did not move under locale. This adds another two, bringing the code here in line with the other sequences like \w
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/regcomp.c b/regcomp.c
index 2da9e9bfb3..d10df82093 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -3884,10 +3884,12 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
break;
case DIGIT:
if (flags & SCF_DO_STCLASS_AND) {
+ if (!(data->start_class->flags & ANYOF_LOCALE)) {
ANYOF_CLASS_CLEAR(data->start_class,ANYOF_NDIGIT);
for (value = 0; value < 256; value++)
if (!isDIGIT(value))
ANYOF_BITMAP_CLEAR(data->start_class, value);
+ }
}
else {
if (data->start_class->flags & ANYOF_LOCALE)
@@ -3901,6 +3903,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
break;
case NDIGIT:
if (flags & SCF_DO_STCLASS_AND) {
+ if (!(data->start_class->flags & ANYOF_LOCALE))
ANYOF_CLASS_CLEAR(data->start_class,ANYOF_DIGIT);
for (value = 0; value < 256; value++)
if (isDIGIT(value))