diff options
author | Karl Williamson <public@khwilliamson.com> | 2010-12-26 10:31:16 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-01-16 16:36:43 -0700 |
commit | a62b1201c068dc7b099bcb7182e188c4d2fbf34c (patch) | |
tree | 6c067a6e4adc8f2333b749fa3592c2812e711b95 /ext/re | |
parent | 5458d9a05ef8545ccbb8a58e670fbede60d10480 (diff) | |
download | perl-a62b1201c068dc7b099bcb7182e188c4d2fbf34c.tar.gz |
Use multi-bit field for regex character set
The /d, /l, and /u regex modifiers are mutually exclusive. This patch
changes the field that stores the character set to use more than one bit
with an enum determining which one. This data structure more
closely follows the semantics of their being mutually exclusive, and
conserves bits as well, and is better expandable.
A small API is added to set and query the bit field.
This patch is not .xs source backwards compatible. A handful of cpan
programs are affected.
Diffstat (limited to 'ext/re')
-rw-r--r-- | ext/re/re.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/re/re.pm b/ext/re/re.pm index 665947e8b7..7a489950f4 100644 --- a/ext/re/re.pm +++ b/ext/re/re.pm @@ -25,9 +25,9 @@ my %reflags = ( x => 1 << ($PMMOD_SHIFT + 3), p => 1 << ($PMMOD_SHIFT + 4), # special cases: - l => 1 << ($PMMOD_SHIFT + 5), - u => 1 << ($PMMOD_SHIFT + 6), d => 0, + l => 1, + u => 2, ); sub setcolor { |