This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: regpiece(): Pass along that is a code block
authorKarl Williamson <khw@cpan.org>
Sun, 4 Oct 2020 23:20:31 +0000 (17:20 -0600)
committerKarl Williamson <khw@cpan.org>
Mon, 12 Oct 2020 15:45:47 +0000 (09:45 -0600)
regpiece was failing to pass up to its caller that a piece of code
contained a code block, if that code was quantified.

I don't know what the consequences of this are

regcomp.c

index ed1cb92..55d8b92 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -12746,6 +12746,9 @@ S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
         }
     }
 
+    /* If this is a code block pass it up */
+    *flagp |= (flags & POSTPONED);
+
     if (max > 0)
         *flagp |= (flags & HASWIDTH);