X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/03570bbb9027efe5485d4776fc22d93ad410a892..e895be217c3be6769708da17c9ae87cb22db040e:/src/class-make-impl.lisp diff --git a/src/class-make-impl.lisp b/src/class-make-impl.lisp index 4785d9c..1da8bac 100644 --- a/src/class-make-impl.lisp +++ b/src/class-make-impl.lisp @@ -183,11 +183,15 @@ ((class sod-class) name (slot sod-slot) pset &key location) (with-slots (initargs) class (with-slots ((type %type)) slot - (push (make-instance (get-property pset :initarg-class :symbol - 'sod-slot-initarg) - :location (file-location location) - :class class :name name :type type :slot slot) - initargs)))) + (setf initargs + (append initargs + (cons (make-instance (get-property pset :initarg-class + :symbol + 'sod-slot-initarg) + :location (file-location location) + :class class :name name + :type type :slot slot) + nil)))))) (defmethod sod-initarg-default ((initarg sod-initarg)) nil) @@ -233,9 +237,11 @@ (defmethod shared-initialize :after ((message sod-message) slot-names &key pset) - (declare (ignore slot-names pset)) (with-slots ((type %type)) message - (check-message-type message type))) + (check-message-type message type)) + (default-slot-from-property (message 'readonlyp slot-names) + (pset :readonly :boolean) + nil)) (defmethod check-message-type ((message sod-message) (type c-function-type)) nil)