mirror of
https://github.com/kanaka/mal.git
synced 2024-11-10 12:47:45 +03:00
Common Lisp: Use a custom hash-function when running on ABCL
This commit is contained in:
parent
4257071937
commit
a1586c57d5
@ -197,10 +197,11 @@
|
||||
|
||||
(defun make-mal-value-hash-table ()
|
||||
(unless (gethash 'mal-data-value-hash genhash::*hash-test-designator-map*)
|
||||
;; ECL's implementation of sxhash does not work well with compound types
|
||||
;; so using a custom hash function which hashes the underlying value
|
||||
(let ((hash-function #+ecl #'mal-sxhash
|
||||
#-ecl #'sxhash))
|
||||
;; ECL and ABCL's implementations of sxhash do not work well with compound
|
||||
;; types, use a custom hash function which hashes the underlying value
|
||||
;; instead
|
||||
(let ((hash-function #+(or ecl abcl) #'mal-sxhash
|
||||
#-(or ecl abcl) #'sxhash))
|
||||
(genhash:register-test-designator 'mal-data-value-hash
|
||||
hash-function
|
||||
#'mal-data-value=)))
|
||||
|
Loading…
Reference in New Issue
Block a user