X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/blobdiff_plain/1645e4335e58ef3a8f1cafb1834e93760d80d9ae..2d8d81c52aded8f15e37b061971d493742f55751:/src/classes.lisp diff --git a/src/classes.lisp b/src/classes.lisp index da18f5a..d403d10 100644 --- a/src/classes.lisp +++ b/src/classes.lisp @@ -294,14 +294,11 @@ (defclass sod-initializer () and `sod-instance-initializer'.")) (defmethod print-object ((initializer sod-initializer) stream) - (if *print-escape* - (print-unreadable-object (initializer stream :type t) - (format stream "~A = ~A" - (sod-initializer-slot initializer) - initializer)) - (format stream "~:[{~A}~;~A~]" - (eq (sod-initializer-value-kind initializer) :single) - (sod-initializer-value-form initializer)))) + (with-slots (slot value-kind value-form) initializer + (if *print-escape* + (print-unreadable-object (initializer stream :type t) + (format stream "~A = ~A" slot value-form)) + (format stream "~:[{~A}~;~A~]" (eq value-kind :single) value-form)))) (export 'sod-class-initializer) (defclass sod-class-initializer (sod-initializer)