This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
lib/utf8.t: Add some tests to stress EBCDIC
[perl5.git] / pad.h
diff --git a/pad.h b/pad.h
index 555bc65..ab46cf4 100644 (file)
--- a/pad.h
+++ b/pad.h
@@ -33,7 +33,15 @@ 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 */
+    union {
+       PAD **  xpadlarr_alloc; /* Pointer to beginning of array of AVs.
+                                  index 0 is a padnamelist *          */
+       struct {
+           PADNAMELIST * padnl;
+           PAD * pad_1;        /* this slice of PAD * array always alloced */
+           PAD * pad_2;        /* maybe unalloced */
+       } * xpadlarr_dbg;       /* for use with a C debugger only */
+    } xpadl_arr;
     U32                xpadl_id;       /* Semi-unique ID, shared between clones */
     U32                xpadl_outid;    /* ID of outer pad */
 };
@@ -293,9 +301,9 @@ Restore the old pad saved into the local variable opad by PAD_SAVE_LOCAL()
 =cut
 */
 
-#define PadlistARRAY(pl)       (pl)->xpadl_alloc
+#define PadlistARRAY(pl)       (pl)->xpadl_arr.xpadlarr_alloc
 #define PadlistMAX(pl)         (pl)->xpadl_max
-#define PadlistNAMES(pl)       ((PADNAMELIST *)*PadlistARRAY(pl))
+#define PadlistNAMES(pl)       *((PADNAMELIST **)PadlistARRAY(pl))
 #define PadlistNAMESARRAY(pl)  PadnamelistARRAY(PadlistNAMES(pl))
 #define PadlistNAMESMAX(pl)    PadnamelistMAX(PadlistNAMES(pl))
 #define PadlistREFCNT(pl)      1       /* reserved for future use */
@@ -433,12 +441,11 @@ Assumes the slot entry is a valid C<our> lexical.
 
 =for apidoc m|STRLEN|PAD_COMPNAME_GEN|PADOFFSET po
 The generation number of the name at offset C<po> in the current
-compiling pad (lvalue).  Note that C<SvUVX> is hijacked for this purpose.
+compiling pad (lvalue).
 
 =for apidoc m|STRLEN|PAD_COMPNAME_GEN_set|PADOFFSET po|int gen
 Sets the generation number of the name at offset C<po> in the current
-ling pad (lvalue) to C<gen>.  Note that C<SvUV_set> is hijacked for this purpose.
-
+ling pad (lvalue) to C<gen>.
 =cut
 
 */
@@ -515,11 +522,5 @@ of a string/length pair.
     Perl_pad_findmy_pvn(aTHX_ STR_WITH_LEN(name), flags)
 
 /*
- * Local variables:
- * c-indentation-style: bsd
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- *
  * ex: set ts=8 sts=4 sw=4 et:
  */