chiark / gitweb /
mdw-base.lisp: Make locative slots be read-only.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 21 Oct 2015 23:46:00 +0000 (00:46 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 22 Oct 2015 00:21:56 +0000 (01:21 +0100)
mdw-base.lisp

index b9e9257ebaaaf24bd2cbbfca100e0b3e6e5c8857..6cdcccf50d00587b37042242bb2a2937e6e4346c 100644 (file)
@@ -412,8 +412,8 @@ (defmacro decf-after (place &optional (by 1))
 (export 'locp)
 (defstruct (loc (:predicate locp) (:constructor make-loc (reader writer)))
   "Locative data type.  See `locf' and `ref'."
-  (reader (slot-uninitialized) :type function)
-  (writer (slot-uninitialized) :type function))
+  (reader (slot-uninitialized) :type function :read-only t)
+  (writer (slot-uninitialized) :type function :read-only t))
 
 (export 'locf)
 (defmacro locf (place &environment env)