Merge commit '29776e85da637ec4d44b2b2822d6934a50c0084b' into boehm-demers-weiser-gc
[bpt/guile.git] / libguile / hashtab.c
index 7ce42b2..633d262 100644 (file)
@@ -109,8 +109,7 @@ scm_fixup_weak_alist (SCM alist, size_t *removed_items)
 
       if (scm_is_pair (pair))
        {
-         if ((SCM_WEAK_PAIR_CAR_DELETED_P (pair))
-             || (SCM_WEAK_PAIR_CDR_DELETED_P (pair)))
+         if (SCM_WEAK_PAIR_DELETED_P (pair))
            {
              /* Remove from ALIST weak pair PAIR whose car/cdr has been
                 nullified by the GC.  */
@@ -1021,14 +1020,8 @@ scm_internal_hash_fold (SCM (*fn) (), void *closure, SCM init, SCM table)
                    SCM_SIMPLE_VECTOR_SET (buckets, i, SCM_CDR (ls));
 
                  if (SCM_HASHTABLE_P (table))
-                   {
-                     /* Update the item count.  */
-                     unsigned long items = SCM_HASHTABLE_N_ITEMS (table);
-
-                     if (items <= 0)
-                       abort ();
-                     SCM_SET_HASHTABLE_N_ITEMS (table, items - 1);
-                   }
+                   /* Update the item count.  */
+                   SCM_HASHTABLE_DECREMENT (table);
 
                  continue;
                }