This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Fix <if> condition
authorKarl Williamson <public@khwilliamson.com>
Mon, 23 Jul 2012 04:09:21 +0000 (22:09 -0600)
committerKarl Williamson <public@khwilliamson.com>
Wed, 25 Jul 2012 03:13:50 +0000 (21:13 -0600)
The else clause is expecting that the regex is compiled under /d, when
in fact, until this commit, it could also be under /l.  I could not come
up with a case currently where this distinction matters, but it's best
to not tempt fate.

regcomp.c

index 8e3a837..744bbd3 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -12355,7 +12355,7 @@ parseit:
      * fold the classes (folding of those is automatically handled by the swash
      * fetching code) */
     if (posixes) {
-        if (AT_LEAST_UNI_SEMANTICS) {
+        if (! DEPENDS_SEMANTICS) {
             if (cp_list) {
                 _invlist_union(cp_list, posixes, &cp_list);
                 SvREFCNT_dec(posixes);
@@ -12365,7 +12365,6 @@ parseit:
             }
         }
         else {
-
             /* Under /d, we put into a separate list the Latin1 things that
              * match only when the target string is utf8 */
             SV* nonascii_but_latin1_properties = NULL;