This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert "regexec.c: don't try accessing non-bitmap if doesn't exist"
authorDavid Mitchell <davem@iabyn.com>
Thu, 10 Mar 2011 14:42:20 +0000 (14:42 +0000)
committerDavid Mitchell <davem@iabyn.com>
Thu, 10 Mar 2011 14:48:08 +0000 (14:48 +0000)
This reverts commit ac51e94be5daabecdeb0ed734f3ccc059b7b77e3.

This commit made many of the re/*.t tests fail, on my build at least.
Haven't looked at why, just reverting it for the moment.

regexec.c

index 56b906c..76784ee 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -6597,12 +6597,11 @@ S_reginclass(pTHX_ const regexp * const prog, register const regnode * const n,
        if (utf8_target && (flags & ANYOF_UNICODE_ALL) && c >= 256) {
            match = TRUE;       /* Everything above 255 matches */
        }
-       else if (ANYOF_NONBITMAP(n)
-                && (flags & ANYOF_NONBITMAP_NON_UTF8)
-                    || (utf8_target
-                        && (c >=256
-                            || (! (flags & ANYOF_LOCALE))
-                            || (flags & ANYOF_IS_SYNTHETIC))))
+       else if ((flags & ANYOF_NONBITMAP_NON_UTF8
+                 || (utf8_target && ANYOF_NONBITMAP(n)
+                     && (c >=256
+                         || (! (flags & ANYOF_LOCALE))
+                         || (flags & ANYOF_IS_SYNTHETIC)))))
        {
            AV *av;
            SV * const sw = regclass_swash(prog, n, TRUE, 0, (SV**)&av);