chiark / gitweb /
src/class-make-impl.lisp: Freeze file locations at object-creation time.
[sod] / src / pset-proto.lisp
index d77a058e5950ebc332677553d2279314e6514586..e16e04c39c5a1f01a6b85ef11caf26de0442eb48 100644 (file)
@@ -55,13 +55,13 @@ (defstruct (property
    distinctly about identifiers, strings and symbols, and we've only got two
    obvious Lisp types to play with.  Sad, but true."
 
-  (name nil :type (or string symbol))
-  (value nil :type t)
-  (%type nil :type symbol)
-  (location (file-location nil) :type file-location)
-  (key nil :type symbol)
+  (name nil :type (or string symbol) :read-only t)
+  (value nil :type t :read-only t)
+  (%type nil :type symbol :read-only t)
+  (location (file-location nil) :type file-location :read-only t)
+  (key nil :type symbol :read-only t)
   (seenp nil :type boolean))
-(define-access-wrapper p-type p-%type)
+(define-access-wrapper p-type p-%type :read-only t)
 
 (export 'decode-property)
 (defgeneric decode-property (raw)
@@ -72,7 +72,8 @@ (defgeneric decode-property (raw)
   (:method ((raw character)) (values :char raw))
   (:method ((raw property)) (values (p-type raw) (p-value raw)))
   (:method ((raw cons)) (values (car raw) (cdr raw)))
-  (:method ((raw function)) (values :func raw)))
+  (:method ((raw function)) (values :func raw))
+  (:method ((raw c-type)) (values :type raw)))
 
 (export 'make-property)
 (defun make-property (name raw-value &key type location seenp)