refine fix of equal? on immutable hash tables and add a test
svn: r10707
This commit is contained in:
parent
5c183baf6e
commit
de3b46aa5b
|
@ -2147,6 +2147,9 @@
|
|||
(test 2 hash-ref im-t "hello" (lambda () 'none))
|
||||
(test #f hash-eq? im-t)
|
||||
|
||||
(test #f equal? #hash((x . 0)) #hash((y . 0)))
|
||||
(test #t equal? #hash((y . 0)) #hash((y . 0)))
|
||||
|
||||
(err/rt-test (hash-set! im-t 1 2))
|
||||
(err/rt-test (hash-remove! im-t 1))
|
||||
(err/rt-test (make-immutable-hasheq '(1)))
|
||||
|
|
|
@ -2388,7 +2388,7 @@ int scheme_hash_tree_equal_rec(Scheme_Hash_Tree *t1, Scheme_Hash_Tree *t2, void
|
|||
for (i = t1->count; i--; ) {
|
||||
scheme_hash_tree_index(t1, i, &k, &v);
|
||||
v2 = scheme_hash_tree_get(t2, k);
|
||||
if (!v || !v2)
|
||||
if (!v2)
|
||||
return 0;
|
||||
if (!scheme_recur_equal(v, v2, eql))
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user