Various HvPLACEHOLDERS() that should be HvPLACEHOLDERS_get()
Nicholas Clark [Mon, 30 May 2005 13:01:27 +0000 (13:01 +0000)]
p4raw-id: //depot/perl@24633

hv.c

diff --git a/hv.c b/hv.c
index 21e7ac3..100bc9e 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -1095,7 +1095,7 @@ S_hsplit(pTHX_ HV *hv)
     /*PerlIO_printf(PerlIO_stderr(), "hsplit called for %p which had %d\n",
       hv, (int) oldsize);*/
 
-    if (HvPLACEHOLDERS(hv) && !SvREADONLY(hv)) {
+    if (HvPLACEHOLDERS_get(hv) && !SvREADONLY(hv)) {
       /* Can make this clear any placeholders first for non-restricted hashes,
         even though Storable rebuilds restricted hashes by putting in all the
         placeholders (first) before turning on the readonly flag, because
@@ -1539,7 +1539,7 @@ void
 Perl_hv_clear_placeholders(pTHX_ HV *hv)
 {
     dVAR;
-    I32 items = (I32)HvPLACEHOLDERS(hv);
+    I32 items = (I32)HvPLACEHOLDERS_get(hv);
     I32 i = HvMAX(hv);
 
     if (items == 0)
@@ -1566,10 +1566,10 @@ Perl_hv_clear_placeholders(pTHX_ HV *hv)
 
                if (--items == 0) {
                    /* Finished.  */
-                   HvTOTALKEYS(hv) -= (IV)HvPLACEHOLDERS(hv);
+                   HvTOTALKEYS(hv) -= (IV)HvPLACEHOLDERS_get(hv);
                    if (HvKEYS(hv) == 0)
                        HvHASKFLAGS_off(hv);
-                   HvPLACEHOLDERS(hv) = 0;
+                   HvPLACEHOLDERS_set(hv, 0);
                    return;
                }
            } else {
@@ -1720,7 +1720,7 @@ Perl_hv_iterinit(pTHX_ HV *hv)
     }
 
     /* used to be xhv->xhv_fill before 5.004_65 */
-    return XHvTOTALKEYS(xhv);
+    return HvTOTALKEYS(hv);
 }
 
 I32 *
@@ -2381,10 +2381,10 @@ Perl_hv_assert(pTHX_ HV *hv)
                    (int) real, (int) HvUSEDKEYS(hv));
       bad = 1;
     }
-    if (HvPLACEHOLDERS(hv) != placeholders) {
+    if (HvPLACEHOLDERS_get(hv) != placeholders) {
       PerlIO_printf(Perl_debug_log,
                    "Count %d placeholder(s), but hash reports %d\n",
-                   (int) placeholders, (int) HvPLACEHOLDERS(hv));
+                   (int) placeholders, (int) HvPLACEHOLDERS_get(hv));
       bad = 1;
     }
   }