diff options
author | Ludovic Courtès <ludo@gnu.org> | 2008-09-10 23:51:21 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2008-09-10 23:51:21 +0200 |
commit | 0306509bc89b753442b503c61310d319e37eee5b (patch) | |
tree | 299a21000f999227ce76cb2ca4d866416ab2e952 | |
parent | b359b36a63844f6fb1e18a070528bcc4fb45c16d (diff) | |
download | guile-0306509bc89b753442b503c61310d319e37eee5b.tar.gz |
Fix broken hash-table merge.
* libguile/hashtab.c (scm_hash_fn_create_handle_x): Return IT only when
it satisfies `scm_is_pair ()'.
-rw-r--r-- | libguile/hashtab.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libguile/hashtab.c b/libguile/hashtab.c index 08209613a..9f85b38ab 100644 --- a/libguile/hashtab.c +++ b/libguile/hashtab.c @@ -92,7 +92,7 @@ static char *s_hashtable = "hashtable"; /* Return a ``usable'' version of ALIST, an alist of weak pairs. By ``usable'', we mean that it contains only valid Scheme objects. On - return, REMOVE_ITEMS is set to the number of pairs that have been + return, REMOVED_ITEMS is set to the number of pairs that have been deleted. */ static SCM scm_fixup_weak_alist (SCM alist, size_t *removed_items) @@ -496,7 +496,7 @@ scm_hash_fn_create_handle_x (SCM table, SCM obj, SCM init, unsigned long (*hash_ if (weak) END_WEAK_BUCKET_FIXUP (table, buckets, k, alist, hash_fn); - if (scm_is_true (it)) + if (scm_is_pair (it)) return it; else if (scm_is_true (it)) scm_wrong_type_arg_msg (NULL, 0, it, "a pair"); |