Skip to content

Commit

Permalink
More tweaks for Clasp
Browse files Browse the repository at this point in the history
  • Loading branch information
yitzchak committed Sep 26, 2024
1 parent d0b00a4 commit 9d76e07
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions code/locks.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
(sb-ext:unlock-package pkg))
new-value)

#+(or allegro clisp cmucl)
#+(or allegro clisp cmucl (and clasp package-locks))
(defun with-unlocked-packages/fallback (packages body-func)
(let ((pkgs (loop for designator in packages
for pkg = (find-package designator)
Expand Down Expand Up @@ -93,6 +93,9 @@
#+ccl
`(let ((ccl:*warn-if-redefine-kernel* nil))
,@body)
#+(and clasp package-locks)
`(with-unlocked-packages/fallback (list-all-packages)
(lambda () ,@body))
#+clisp
`(with-unlocked-packages/fallback (list-all-packages)
(lambda () ,@body))
Expand All @@ -102,7 +105,7 @@
`(ext:without-package-locks ,@body)
#+sb-package-locks
`(sb-ext:without-package-locks ,@body)
#-(or allegro ccl clisp cmucl ecl sb-package-locks)
#-(or allegro ccl (and clasp package-locks) clisp cmucl ecl sb-package-locks)
`(progn ,@body))

(defmacro with-unlocked-system-packages (&body body)
Expand Down

0 comments on commit 9d76e07

Please sign in to comment.