Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hash-table construction on Allegro CL. #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions graph.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
#+(or ccl lispworks)
(make-hash-table :test 'edge-equalp :hash-function 'sxhash-edge)
#+allegro
(make-hash-table :test 'edge-equalp)
(make-hash-table :test 'edge-equalp :hash-function 'sxhash-edge)
#+ecl
(make-hash-table :test 'edge-equalp :hash-function 'sxhash-edge)
#-(or sbcl clisp ccl allegro lispworks ecl)
Expand All @@ -253,7 +253,7 @@
#+(or ccl lispworks)
(make-hash-table :test 'dir-edge-equalp :hash-function 'sxhash)
#+allegro
(make-hash-table :test 'dir-edge-equalp)
(make-hash-table :test 'dir-edge-equalp :hash-function 'sxhash)
#+ecl
(make-hash-table :test 'dir-edge-equalp :hash-function 'sxhash)
#-(or sbcl clisp ccl allegro lispworks ecl)
Expand Down Expand Up @@ -291,14 +291,19 @@ to a new equality test specified with TEST."
:hash-function (case (or test (hash-table-test hash))
(edge-equalp 'sxhash-edge)
((dir-edge-equalp equalp) 'sxhash)))
#+allegro
(make-hash-table :test (or test (hash-table-test hash))
:hash-function (case (or test (hash-table-test hash))
(edge-equalp 'sxhash-edge)
((dir-edge-equalp equalp) 'sxhash)))
#+ecl
(make-hash-table
:test (or test (hash-table-test hash))
:hash-function (let ((test (or test (hash-table-test hash))))
(cond ((eql test #'edge-equalp) 'sxhash-edge)
((member test (list #'dir-edge-equalp #'equalp))
'sxhash))))
#-(or sbcl clisp ccl lispworks ecl)
#-(or sbcl clisp ccl lispworks ecl allegro)
(error "unsupported lisp distribution")))
(maphash (lambda (k v) (setf (gethash k copy)
(if (and (gethash k copy) comb)
Expand Down Expand Up @@ -1487,4 +1492,5 @@ the `cdr' holds the nodes in the ordering."))

(defmethod k-cores ((graph graph))
(multiple-value-bind (k cores) (degeneracy graph)
(declare (ignorable k)) cores))
(declare (ignorable k))
cores))