From 657deda22e04e0f50d0aa63a83b806bebe2b7b1a Mon Sep 17 00:00:00 2001 From: Jan Moringen Date: Fri, 20 Sep 2013 22:19:30 +0200 Subject: [PATCH] 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. --- src/code/target-error.lisp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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) -- 1.7.10.4