diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-03-16 11:49:48 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-03-16 20:56:27 -0600 |
commit | bcc0256f98811a88bfdf8444f309ce60909d3bc1 (patch) | |
tree | d0234bd0840ba68c7bb9fa1be75282e0d6cd8cb6 /regcomp.c | |
parent | 871d0d1aa0b41dbd74400c89ecc7738ea63f6594 (diff) | |
download | perl-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.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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)) |