Browse files

Redefine backend bugfix

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.

  • Loading branch information...
1 parent 4798c5d commit 7b8fb167a5b8bacc8dbc43cd6147390576189537 @NikolausDemmel NikolausDemmel committed Jan 29, 2010
Showing with 4 additions and 3 deletions.
  1. +4 −3 backends.lisp
7 backends.lisp
@@ -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*)
(defun alias-backend (old alias)

0 comments on commit 7b8fb16

Please sign in to comment.