Remove union _xivu from struct xpvhv - replace it with a non-union xav_keys.
Nicholas Clark [Mon, 25 Jan 2010 14:28:30 +0000 (14:28 +0000)]
hv.h
sv.c

diff --git a/hv.h b/hv.h
index 4381994..db79b46 100644 (file)
--- a/hv.h
+++ b/hv.h
@@ -87,11 +87,9 @@ struct xpvhv {
     union _xmgu        xmg_u;
     STRLEN      xhv_fill;       /* how full xhv_array currently is */
     STRLEN      xhv_max;        /* subscript of last element of xhv_array */
-    union _xivu xiv_u;
+    STRLEN     xhv_keys;       /* total keys, including placeholders */
 };
 
-#define xhv_keys xiv_u.xivu_iv
-
 /* hash a key */
 /* FYI: This is the "One-at-a-Time" algorithm by Bob Jenkins
  * from requirements by Colin Plumb.
diff --git a/sv.c b/sv.c
index fe3f362..fd8a82a 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -982,7 +982,7 @@ static const struct body_details bodies_by_type[] = {
       FIT_ARENA(0, sizeof(XPVAV)) },
 
     { sizeof(XPVHV),
-      copy_length(XPVHV, xiv_u),
+      copy_length(XPVHV, xhv_keys),
       0,
       SVt_PVHV, TRUE, NONV, HASARENA,
       FIT_ARENA(0, sizeof(XPVHV)) },