Weird hash-table with :test #'fli:pointer-eq :hash-function #'fli:pointer-address
Hello lispworkers,
Consider the following code (LWW 4.3.6):
(setq ht (make-hash-table :test #'fli:pointer-eq
:hash-function #'fli:pointer-address))
(setq p (fli:make-pointer :address #x00CC0008))
(setf (gethash p ht) "One")
(gethash p ht) ;=> nil, nil
What is wrong?
When I don't specify the hash-function argument explicitly, this works at
the first glance:
(setq ht (make-hash-table :test #'fli:pointer-eq))
...
(gethash p ht) ;=> "One", T
But later, e.g. when trying to inspect the hash-table, that leads to a
processor fault in
(<#function SYSTEM::USER-TEST-HASHFN 201634CA>).
--
Sincerely,
Dmitri Ivanov
lisp.ystok.ru