fix builds under USE_PAD_RESET
authorDavid Mitchell <davem@iabyn.com>
Tue, 20 Sep 2016 08:45:07 +0000 (09:45 +0100)
committerDavid Mitchell <davem@iabyn.com>
Mon, 26 Sep 2016 08:20:14 +0000 (09:20 +0100)
It had suffered some bitrot.

op.c
pad.c

diff --git a/op.c b/op.c
index 66cac9b..3e44be8 100644 (file)
--- a/op.c
+++ b/op.c
@@ -5744,7 +5744,13 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, OP *repl, bool isreg, I32 floor)
                SSize_t i = 0;
                assert(PadnamelistMAXNAMED(PL_comppad_name) == 0);
                while (++i <= AvFILLp(PL_comppad)) {
+#  ifdef USE_PAD_RESET
+                    /* under USE_PAD_RESET, pad swipe replaces a swiped
+                     * folded constant with a fresh padtmp */
+                   assert(!PL_curpad[i] || SvPADTMP(PL_curpad[i]));
+#  else
                    assert(!PL_curpad[i]);
+#  endif
                }
 #endif
                /* But we know that one op is using this CV's slab. */
diff --git a/pad.c b/pad.c
index 7cf1fe3..bdaf948 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -756,7 +756,7 @@ Perl_pad_alloc(pTHX_ I32 optype, U32 tmptype)
            sv = *av_fetch(PL_comppad, retval, TRUE);
            if (!(SvFLAGS(sv) &
 #ifdef USE_PAD_RESET
-                   (konst ? SVs_PADTMP : 0))
+                   (konst ? SVs_PADTMP : 0)
 #else
                    SVs_PADTMP
 #endif