From: Jan Moringen Date: Fri, 20 Sep 2013 20:19:30 +0000 (+0200) Subject: Make some RESTART slots read-only X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=657deda22e04e0f50d0aa63a83b806bebe2b7b1a;p=sbcl.git Make some RESTART slots read-only The RESTART slots FUNCTION, REPORT-FUNCTION, INTERACTIVE-FUNCTION and TEST-FUNCTION are never mutated and can thus be read-only. --- diff --git a/src/code/target-error.lisp b/src/code/target-error.lisp index 5e1ad55..e66346a 100644 --- a/src/code/target-error.lisp +++ b/src/code/target-error.lisp @@ -44,10 +44,11 @@ (defstruct (restart (:copier nil) (:predicate nil)) (name (missing-arg) :type symbol :read-only t) - (function (missing-arg) :type function) - (report-function nil :type (or null function)) - (interactive-function nil :type (or null function)) - (test-function (lambda (cond) (declare (ignore cond)) t) :type function)) + (function (missing-arg) :type function :read-only t) + (report-function nil :type (or null function) :read-only t) + (interactive-function nil :type (or null function) :read-only t) + (test-function (lambda (cond) (declare (ignore cond)) t) :type function :read-only t)) + (def!method print-object ((restart restart) stream) (if *print-escape* (print-unreadable-object (restart stream :type t :identity t)