This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Serialise changes to %^H onto the current COP. Return the compile time
[perl5.git] / pad.h
diff --git a/pad.h b/pad.h
index acfb58e..022a7de 100644 (file)
--- a/pad.h
+++ b/pad.h
@@ -50,14 +50,20 @@ typedef enum {
  * whether PL_comppad and PL_curpad are consistent and whether they have
  * active values */
 
+#ifndef PERL_MAD
+#  define pad_peg(label)
+#endif
+
 #ifdef DEBUGGING
 #  define ASSERT_CURPAD_LEGAL(label) \
+    pad_peg(label); \
     if (PL_comppad ? (AvARRAY(PL_comppad) != PL_curpad) : (PL_curpad != 0))  \
        Perl_croak(aTHX_ "panic: illegal pad in %s: 0x%"UVxf"[0x%"UVxf"]",\
            label, PTR2UV(PL_comppad), PTR2UV(PL_curpad));
 
 
 #  define ASSERT_CURPAD_ACTIVE(label) \
+    pad_peg(label); \
     if (!PL_comppad || (AvARRAY(PL_comppad) != PL_curpad))               \
        Perl_croak(aTHX_ "panic: invalid pad in %s: 0x%"UVxf"[0x%"UVxf"]",\
            label, PTR2UV(PL_comppad), PTR2UV(PL_curpad));