summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2010-12-06 08:35:17 -0700
committerFather Chrysostomos <sprout@cpan.org>2010-12-07 18:52:42 -0800
commit6ab9ea91fb04390bf9c50134beadab7cf6fd0c25 (patch)
tree7d8119d24b68bbe4fa4fe372c5ad29e26daa4462
parent81c14aa2230ca380c2f424e69ac8f9dc0bb4ae23 (diff)
downloadperl-6ab9ea91fb04390bf9c50134beadab7cf6fd0c25.tar.gz
regcomp.c: Add locale for \d
The DIGITL and NDIGITL regnodes were not being generated; instead regular DIGIT and NDIGIT regnodes were even under locale. This means no one has probably ever used Perl on a locale that changed the digits.
-rw-r--r--regcomp.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/regcomp.c b/regcomp.c
index 6f3bfe8178..4fb8c37c18 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -7445,11 +7445,19 @@ tryagain:
*flagp |= HASWIDTH|SIMPLE;
goto finish_meta_pat;
case 'd':
- ret = reg_node(pRExC_state, DIGIT);
+ if (LOC) {
+ ret = reg_node(pRExC_state, (U8)(DIGITL));
+ } else {
+ ret = reg_node(pRExC_state, (U8)(DIGIT));
+ }
*flagp |= HASWIDTH|SIMPLE;
goto finish_meta_pat;
case 'D':
- ret = reg_node(pRExC_state, NDIGIT);
+ if (LOC) {
+ ret = reg_node(pRExC_state, (U8)(NDIGITL));
+ } else {
+ ret = reg_node(pRExC_state, (U8)(NDIGIT));
+ }
*flagp |= HASWIDTH|SIMPLE;
goto finish_meta_pat;
case 'R':