0.9.7.22:
authorChristophe Rhodes <csr21@cam.ac.uk>
Fri, 9 Dec 2005 11:02:28 +0000 (11:02 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Fri, 9 Dec 2005 11:02:28 +0000 (11:02 +0000)
Whoops.  Make (setf class-name) and (setf generic-function-name)
generic functions again; AMOP may not specify it, but ANSI
does...
... also log some bugs

BUGS
NEWS
src/pcl/generic-functions.lisp
src/pcl/methods.lisp
tests/clos.pure.lisp
version.lisp-expr

diff --git a/BUGS b/BUGS
index c546bc4..7bbd84c 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -2092,4 +2092,14 @@ WORKAROUND:
   compiler's type deriver.
 
 392: slot-accessor for subclass misses obsoleted superclass
-  (fixed in sbcl-0.9.7.9)
\ No newline at end of file
+  (fixed in sbcl-0.9.7.9)
+
+393: Wrong error from methodless generic function
+    (DEFGENERIC FOO (X))
+    (FOO 1 2)
+  gives NO-APPLICABLE-METHOD rather than an argument count error.
+
+394: (SETF CLASS-NAME)/REINITIALIZE-INSTANCE bug
+    (found by PFD ansi-tests)
+  in sbcl-0.9.7.15, (SETF (CLASS-NAME <class>) 'NIL) causes
+  (FIND-CLASS NIL) to return a #<STANDARD-CLASS NIL>.
diff --git a/NEWS b/NEWS
index 93a54e1..38a9669 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,10 @@
 ;;;; -*- coding: utf-8; -*-
 changes in sbcl-0.9.8 relative to sbcl-0.9.7:
+  * minor incompatible change: (SETF CLASS-NAME) and (SETF
+    GENERIC-FUNCTION-NAME) are generic functions once more (reverting
+    the change in the 0.9.7 release).  (SETF CLASS-NAME) is specified
+    by ANSI as a generic function, and for consistency (SETF
+    GENERIC-FUNCTION-NAME) is treated likewise.
   * fixed bug #390: :CHARACTER-SET pathname components now work as
     expected.  (reported by Tim Daly Jr)
   * fixed bug #391: complicated :TYPE intersections in slot
index e0dabdf..5692ff4 100644 (file)
 
 (defgeneric (setf class-incompatible-superclass-list) (new-value pcl-class))
 
+(defgeneric (setf class-name) (new-value class))
+
 (defgeneric (setf class-slots) (new-value slot-class))
 
 (defgeneric (setf generic-function-method-class) (new-value
 (defgeneric (setf generic-function-methods) (new-value
                                              standard-generic-function))
 
+(defgeneric (setf generic-function-name) (new-value standard-generic-function))
+
 (defgeneric (setf gf-dfun-state) (new-value standard-generic-function))
 
 (defgeneric (setf generic-function-initial-methods)
index 041bcd6..9d0fe31 100644 (file)
              (set-dfun gf dfun cache info) ; lest the cache be freed twice
              (update-dfun gf dfun cache info))))))
 \f
-(defun (setf class-name) (new-value class)
+(defmethod (setf class-name) (new-value class)
   (let ((classoid (%wrapper-classoid (class-wrapper class))))
     (setf (classoid-name classoid) new-value))
   (reinitialize-instance class :name new-value))
 
-(defun (setf generic-function-name) (new-value generic-function)
+(defmethod (setf generic-function-name) (new-value generic-function)
   (reinitialize-instance generic-function :name new-value))
 \f
 (defmethod function-keywords ((method standard-method))
index 5a20e88..425a0b2 100644 (file)
@@ -46,3 +46,6 @@
 (let (result)
   (sb-pcl::map-all-classes (lambda (c) (push c result)))
   (assert (equal result (remove-duplicates result))))
+
+;;; this one's user-observable
+(assert (typep #'(setf class-name) 'generic-function))
index 0ffa9da..dbab5d6 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.9.7.21"
+"0.9.7.22"