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

2008-01-17 Thread Neil Jerram
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? 'ba

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

2008-01-17 Thread Neil Jerram
Follow-up Comment #2, bug #22022 (project guile): Another one: (pass-if (equal? "#" (with-output-to-string (lambda () (write table))) Actual output here has 33 instead of 34. I believe 33 is correct, because the additions to the hash table run from 2 up to 34, not f

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

2008-01-17 Thread Neil Jerram
Gregory Marton <[EMAIL PROTECTED]> writes: > As an enhancement request, it would be nice for the common case to be able to > pass a hash-function argument and assoc to make-hash-table or to have a > (make-hashx-table hash assoc [size]), and in either case to remember the hash > function so that re

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

2008-01-17 Thread Neil Jerram
Follow-up Comment #3, bug #22022 (project guile): And here are all the remaining ones. I've added a (pk ...) in each case, so the output from make check shows what the actual hash?-ref value was. ;;; (#f) FAIL: hash.test: auto-resizing hashx: (equal? (quote eq) (pk (hashq-ref table 4))) ;;; (#

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

2008-01-17 Thread Neil Jerram
Gregory Marton <[EMAIL PROTECTED]> writes: > Ack. I think I meant to replace assoc as well, with something like > (lambda (k alist) (cdar alist)). That wouldn't be assoc-like. (lambda (k al) (car al)) accesses the correct level of alist structure, but would fault in the case where al is empty.