From: Christophe Rhodes Date: Fri, 9 Dec 2005 11:02:28 +0000 (+0000) Subject: 0.9.7.22: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=0f807aea814ad6eddea7824675da1ed2ff9cba86;p=sbcl.git 0.9.7.22: 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 --- diff --git a/BUGS b/BUGS index c546bc4..7bbd84c 100644 --- 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 ) 'NIL) causes + (FIND-CLASS NIL) to return a #. diff --git a/NEWS b/NEWS index 93a54e1..38a9669 100644 --- 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 diff --git a/src/pcl/generic-functions.lisp b/src/pcl/generic-functions.lisp index e0dabdf..5692ff4 100644 --- a/src/pcl/generic-functions.lisp +++ b/src/pcl/generic-functions.lisp @@ -164,6 +164,8 @@ (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 @@ -178,6 +180,8 @@ (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) diff --git a/src/pcl/methods.lisp b/src/pcl/methods.lisp index 041bcd6..9d0fe31 100644 --- a/src/pcl/methods.lisp +++ b/src/pcl/methods.lisp @@ -1560,12 +1560,12 @@ (set-dfun gf dfun cache info) ; lest the cache be freed twice (update-dfun gf dfun cache info)))))) -(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)) (defmethod function-keywords ((method standard-method)) diff --git a/tests/clos.pure.lisp b/tests/clos.pure.lisp index 5a20e88..425a0b2 100644 --- a/tests/clos.pure.lisp +++ b/tests/clos.pure.lisp @@ -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)) diff --git a/version.lisp-expr b/version.lisp-expr index 0ffa9da..dbab5d6 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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"