bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #22022] hashx-set! and -ref


From: Gregory Marton
Subject: Re: [bug #22022] hashx-set! and -ref
Date: Thu, 17 Jan 2008 16:54:53 -0500 (EST)

Ack. I think I meant to replace assoc as well, with something like (lambda (k alist) (cdar alist)). My intention was to get it to give me back 'bar because the hash functions would accept anything, rather than because it was "right" in any sense.

Sorry,
Grem

Follow-up Comment #1, bug #22022 (project guile):

I think I have a fix for the segfault, but now I'm seeing several other test
failures.  Here's one...

(pass-if (let ((table (make-hash-table)))
            (hashx-set! (lambda (k v) 1) assoc table 'foo 'bar)
            (equal?
             'bar (hashx-ref (lambda (k v) 1) assoc table 'baz))))

This one is wrong, isn't it?  It sets an entry with key 'foo, then queries
the entry with key 'baz.  So the result, correctly, is #f.  What was your
intention here?


   _______________________________________________________

Reply to this item at:

 <http://savannah.gnu.org/bugs/?22022>

_______________________________________________
 Message sent via/by Savannah
 http://savannah.gnu.org/



--
------ __@   Gregory A. Marton                http://csail.mit.edu/~gremio/
--- _`\<,_                                                                .
-- (*)/ (*)                 A closed mouth gathers no foot.
~~~~~~~~~~~~~~~~-~~~~~~~~_~~~_~~~~~v~~~~^^^^~~~~~--~~~~~~~~~~~~~~~++~~~~~~~





reply via email to

[Prev in Thread] Current Thread [Next in Thread]