Re: [PATCH 5.8.7 RC1] lib/Carp.t todo for VMS
[p5sagit/p5-mst-13.2.git] / hv.h
diff --git a/hv.h b/hv.h
index 2388113..60d2eed 100644 (file)
--- a/hv.h
+++ b/hv.h
@@ -42,18 +42,28 @@ struct xpvhv_aux {
 /* hash structure: */
 /* This structure must match the beginning of struct xpvmg in sv.h. */
 struct xpvhv {
-    char *     xhv_array;      /* pointer to malloced string */
     STRLEN     xhv_fill;       /* how full xhv_array currently is */
     STRLEN     xhv_max;        /* subscript of last element of xhv_array */
-    IV         xhv_keys;       /* how many elements in the array */
-    NV         xnv_nv;         /* numeric value, if any */
+    IV         for_rent;
+    union {
+       NV      xnvu_nv;        /* numeric value, if any */
+       struct {
+           void *xnv_p1;
+           union {
+               void *xnv_p2;
+               IV xnv_i2;      /* how many elements in the array */
+           }   xnv_u2;
+       }       xnv_s;
+    }          xnv_u;
     MAGIC*     xmg_magic;      /* magic for scalar array */
     HV*                xmg_stash;      /* class package */
-
-    struct xpvhv_aux* xhv_aux;
     /* list of pm's for this package is now stored in symtab magic.  */
 };
 
+#define xhv_aux xnv_u.xnv_s.xnv_p1
+#define xhv_keys xnv_u.xnv_s.xnv_u2.xnv_i2
+
+
 /* hash a key */
 /* FYI: This is the "One-at-a-Time" algorithm by Bob Jenkins
  * from requirements by Colin Plumb.
@@ -183,7 +193,7 @@ C<SV*>.
 
 
 #define Nullhv Null(HV*)
-#define HvARRAY(hv)    (*(HE***)&((XPVHV*)  SvANY(hv))->xhv_array)
+#define HvARRAY(hv)    (*(HE***)&((hv)->sv_u.sv_array))
 #define HvFILL(hv)     ((XPVHV*)  SvANY(hv))->xhv_fill
 #define HvMAX(hv)      ((XPVHV*)  SvANY(hv))->xhv_max
 #define HvRITER(hv)    (*Perl_hv_riter_p(aTHX_ (HV*)(hv)))