Skip to content

Commit

Permalink
Redefine backend bugfix
Browse files Browse the repository at this point in the history
Ignore-this: e25b20f012fbe14a22c5ff4113de9cd6

The "Redefine Backend" restart in REGISTER-BACKEND did not work as
advertised (it did not register the new backend at all). This patch
makes sure the old backend is removed and the new one is added.

darcs-hash:20100129161309-55f2f-d3e841cb2d573706d9936e213d664e02abf8cf9a.gz
  • Loading branch information
NikolausDemmel committed Jan 29, 2010
1 parent 4798c5d commit 7b8fb16
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions backends.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ if ERRORP is false, otherwise an error is signalled."
:old-magic-numbers old-magic-numbers
:compatible-magic-numbers compatible-magic-numbers
:stream-type stream-type)))
(if (assoc name *registered-backends*)
(cerror "Redefine backend" "Backend ~A is already defined." name)
(push (cons name instance) *registered-backends*))
(when (assoc name *registered-backends*)
(cerror "Redefine backend" "Backend ~A is already defined." name)
(setf *registered-backends* (remove name *registered-backends* :key #'car)))
(push (cons name instance) *registered-backends*)
instance))

(defun alias-backend (old alias)
Expand Down

0 comments on commit 7b8fb16

Please sign in to comment.