X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Flow.lisp;h=1f9a12cda948d6533e291e58751b68e302ba12f0;hb=22aec7852f4861e5dab28cc0d619c24b62590dad;hp=34537ac7d6ab1fde3402236e8f18bd5bd8529664;hpb=dc86450e18fb7b90bf6be7d8df8b8ebcb0d090f9;p=sbcl.git diff --git a/src/pcl/low.lisp b/src/pcl/low.lisp index 34537ac..1f9a12c 100644 --- a/src/pcl/low.lisp +++ b/src/pcl/low.lisp @@ -351,9 +351,11 @@ (defun structure-slotd-reader-function (slotd) (fdefinition (dsd-accessor-name slotd))) -(defun structure-slotd-writer-function (slotd) - (unless (dsd-read-only slotd) - (fdefinition `(setf ,(dsd-accessor-name slotd))))) +(defun structure-slotd-writer-function (type slotd) + (if (dsd-read-only slotd) + (let ((dd (get-structure-dd type))) + (coerce (slot-setter-lambda-form dd slotd) 'function)) + (fdefinition `(setf ,(dsd-accessor-name slotd))))) (defun structure-slotd-type (slotd) (dsd-type slotd))