This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Devel::Peek docs with Dump changes
[perl5.git] / pad.h
diff --git a/pad.h b/pad.h
index f65af17..2558b7e 100644 (file)
--- a/pad.h
+++ b/pad.h
@@ -31,8 +31,7 @@ typedef U64TYPE PADOFFSET;
 struct padlist {
     SSize_t    xpadl_max;      /* max index for which array has space */
     PAD **     xpadl_alloc;    /* pointer to beginning of array of AVs */
-    U32                xpadl_id;       /* Semi-unique ID, shared between clones */
-    U32                xpadl_outid;    /* ID of outer pad */
+    PADNAMELIST*xpadl_outid;   /* Padnamelist of outer pad; used as ID */
 };
 
 
@@ -286,12 +285,14 @@ Restore the old pad saved into the local variable opad by PAD_SAVE_LOCAL()
 
 #define PadnamelistARRAY(pnl)  AvARRAY(pnl)
 #define PadnamelistMAX(pnl)    AvFILLp(pnl)
+#define PadnamelistMAXNAMED(pnl) \
+       ((XPVAV*) SvANY(pnl))->xmg_u.xmg_hash_index
 
 #define PadARRAY(pad)          AvARRAY(pad)
 #define PadMAX(pad)            AvFILLp(pad)
 
 #define PadnamePV(pn)          (SvPOKp(pn) ? SvPVX(pn) : NULL)
-#define PadnameLEN(pn)         SvCUR(pn)
+#define PadnameLEN(pn)         ((pn) == &PL_sv_undef ? 0 : SvCUR(pn))
 #define PadnameUTF8(pn)                !!SvUTF8(pn)
 #define PadnameSV(pn)          pn
 #define PadnameIsOUR(pn)       !!SvPAD_OUR(pn)