This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Changes needed to get Storable to compile on 5.005_03.
[perl5.git] / hv.h
diff --git a/hv.h b/hv.h
index 4a2f053..6e19c84 100644 (file)
--- a/hv.h
+++ b/hv.h
@@ -1,7 +1,7 @@
 /*    hv.h
  *
  *    Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999,
- *    2000, 2001, 2002, 2005, by Larry Wall and others
+ *    2000, 2001, 2002, 2003, 2005, 2006, 2007, by Larry Wall and others
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -80,9 +80,6 @@ struct xpvhv {
 
 #define xhv_keys xiv_u.xivu_iv
 
-#if 0
-typedef struct xpvhv xpvhv_allocated;
-#else
 typedef struct {
     STRLEN     xhv_fill;       /* how full xhv_array currently is */
     STRLEN     xhv_max;        /* subscript of last element of xhv_array */
@@ -99,7 +96,6 @@ typedef struct {
     } xmg_u;
     HV*                xmg_stash;      /* class package */
 } xpvhv_allocated;
-#endif
 
 /* hash a key */
 /* FYI: This is the "One-at-a-Time" algorithm by Bob Jenkins
@@ -307,8 +303,7 @@ C<SV*>.
 #define HeHASH(he)             HEK_HASH(HeKEY_hek(he))
 #define HePV(he,lp)            ((HeKLEN(he) == HEf_SVKEY) ?            \
                                 SvPV(HeKEY_sv(he),lp) :                \
-                                (((lp = HeKLEN(he)) >= 0) ?            \
-                                 HeKEY(he) : NULL))
+                                ((lp = HeKLEN(he)), HeKEY(he)))
 
 #define HeSVKEY(he)            ((HeKEY(he) &&                          \
                                  HeKLEN(he) == HEf_SVKEY) ?            \