chiark / gitweb /
src/final.lisp: Add function for interactively testing type parsing.
[sod] / src / classes.lisp
index 31878379d3b4188bc11c6295b1ff3a14abc679c9..d403d109e60fdbe131a4428b983ecb15b804c237 100644 (file)
@@ -7,7 +7,7 @@
 
 ;;;----- Licensing notice ---------------------------------------------------
 ;;;
-;;; This file is part of the Sensble Object Design, an object system for C.
+;;; This file is part of the Sensible Object Design, an object system for C.
 ;;;
 ;;; SOD is free software; you can redistribute it and/or modify
 ;;; it under the terms of the GNU General Public License as published by
@@ -88,7 +88,7 @@ (defclass sod-class ()
    (effective-methods :type list :reader sod-class-effective-methods)
    (vtables :type list :reader sod-class-vtables)
 
-   (state :initform nil :type (member nil :finalized broken)
+   (state :initform nil :type (member nil :finalized :broken)
          :reader sod-class-state))
   (:documentation
    "Classes describe the layout and behaviour of objects.
@@ -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)