diff options
author | Karl Williamson <public@khwilliamson.com> | 2010-12-06 08:35:17 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-12-07 18:52:42 -0800 |
commit | 6ab9ea91fb04390bf9c50134beadab7cf6fd0c25 (patch) | |
tree | 7d8119d24b68bbe4fa4fe372c5ad29e26daa4462 | |
parent | 81c14aa2230ca380c2f424e69ac8f9dc0bb4ae23 (diff) | |
download | perl-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.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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': |