0.8.0.60:
authorChristophe Rhodes <csr21@cam.ac.uk>
Tue, 10 Jun 2003 13:04:32 +0000 (13:04 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Tue, 10 Jun 2003 13:04:32 +0000 (13:04 +0000)
Fix yet another Dietz bug:
... in DEFCLASS, we only redefine an existing class with name
CLASS-NAME if said name is the proper name for the class;
... ask for a new class (by passing NIL to ENSURE-CLASS-USING-CLASS)
otherwise.

NEWS
src/pcl/std-class.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index b4e3018..5c54d08 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1836,6 +1836,9 @@ changes in sbcl-0.8.1 relative to sbcl-0.8.0:
        argument is true.
     ** TYPE-OF returns recognizeable subtypes of all built-in-types of
        which its argument is a member.
+    ** DEFCLASS only redefines the class named by its class-name
+       argument if that name is the proper name of the class;
+       otherwise, it creates a new class.
 
 planned incompatible changes in 0.8.x:
   * (not done yet, but planned:) When the profiling interface settles
index 22c3c10..50fd53a 100644 (file)
 
 (setf (gdefinition 'load-defclass) #'real-load-defclass)
 
-(defun ensure-class (name &rest all)
-  (apply #'ensure-class-using-class (find-class name nil) name all))
+(defun ensure-class (name &rest args)
+  (apply #'ensure-class-using-class
+        (let ((class (find-class name nil)))
+          (when (and class (eq name (class-name class)))
+            ;; NAME is the proper name of CLASS, so redefine it
+            class))
+        name
+        args))
 
 (defmethod ensure-class-using-class ((class null) name &rest args &key)
   (multiple-value-bind (meta initargs)
index 3a3a291..4b18c37 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.0.59"
+"0.8.0.60"