summaryrefslogtreecommitdiff
path: root/libguile/hashtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/hashtab.c')
-rw-r--r--libguile/hashtab.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/libguile/hashtab.c b/libguile/hashtab.c
index 453a6742b..a1d6bb48f 100644
--- a/libguile/hashtab.c
+++ b/libguile/hashtab.c
@@ -30,6 +30,27 @@
#include "libguile/hashtab.h"
+static void
+loop (void)
+{
+ int loop = 1;
+ printf ("looping %d\n", getpid ());
+ while (loop)
+ ;
+}
+
+void
+scm_i_hashtable_decrement (SCM h)
+{
+ scm_t_hashtable *t = SCM_HASHTABLE (h);
+ if (t->n_items == 0)
+ {
+ printf ("hashtab underflow\n");
+ loop ();
+ }
+ t->n_items--;
+}
+
/* NOTES
*
* 1. The current hash table implementation uses weak alist vectors
@@ -145,7 +166,7 @@ scm_i_rehash (SCM table,
SCM_HASHTABLE (table)->closure = closure;
}
SCM_HASHTABLE (table)->size_index = i;
-
+
new_size = hashtable_size[i];
if (i <= SCM_HASHTABLE (table)->min_size_index)
SCM_HASHTABLE (table)->lower = 0;