diff options
author | Karl Williamson <khw@cpan.org> | 2016-03-19 22:02:32 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2016-03-19 22:16:40 -0600 |
commit | 4ae69d38605cf6ef02d0d304ad4fbb45603ecabb (patch) | |
tree | 72404b1df219e7268362f2b211c3c54b2e1d4b19 /regcomp.c | |
parent | 7d12a7395ed4377d6531130e7cfa743ad5b46530 (diff) | |
download | perl-4ae69d38605cf6ef02d0d304ad4fbb45603ecabb.tar.gz |
regcomp.c: Fix -Dr output.
I got things slightly wroing in
b77aba85f6ec3b2a2341077b14f39261c5753cea. It did not properly handle
the case for inversion /d of complemented classes, such as \W. Two
examples being [^\W0-9] and [^\S\wa].
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -20039,14 +20039,7 @@ S_put_charclass_bitmap_innards(pTHX_ SV *sv, /* And this flag for matching all non-ASCII 0xFF and below */ if (flags & ANYOF_SHARED_d_MATCHES_ALL_NON_UTF8_NON_ASCII_non_d_WARN_SUPER) { - if (invert) { - not_utf8 = _new_invlist(0); - } - else { - not_utf8 = invlist_clone(PL_UpperLatin1); - } - inverting_allowed = FALSE; /* XXX needs more work to be able - to allow this */ + not_utf8 = invlist_clone(PL_UpperLatin1); } } else if (OP(node) == ANYOFL) { @@ -20148,6 +20141,7 @@ S_put_charclass_bitmap_innards(pTHX_ SV *sv, * conditional code points, so that when inverted, they will be gone * from it */ _invlist_union(only_utf8, invlist, &invlist); + _invlist_union(not_utf8, invlist, &invlist); _invlist_union(only_utf8_locale, invlist, &invlist); _invlist_invert(invlist); _invlist_intersection(invlist, PL_InBitmap, &invlist); |