corrected slot value extraction for printing.

Pascal J. Bourguignon [2014-02-06 00:40]
corrected slot value extraction for printing.
Filename
common-lisp/cesarum/utility.lisp
diff --git a/common-lisp/cesarum/utility.lisp b/common-lisp/cesarum/utility.lisp
index 4e5564e..f686d59 100644
--- a/common-lisp/cesarum/utility.lisp
+++ b/common-lisp/cesarum/utility.lisp
@@ -721,7 +721,7 @@ SEE:            PRINT-PARSEABLE-OBJECT
                             (list (class-name (class-of object))))
                           (funcall thunk object)
                           (when identity
-                            (list (object-identity object)))))
+                            (list :id (object-identity object)))))
           object))))


@@ -738,8 +738,10 @@ RETURN:         A form building a plist of slot values.
                           (intern (symbol-name slot) "KEYWORD")
                           `(quote ,(first slot)))
             :collect  (if (symbolp slot)
-                        `(ignore-errors (slot-value ,ovar ',slot))
-                        `(ignore-errors ,(second slot)))))))
+                          `(if (slot-boundp ,ovar ',slot)
+                               (slot-value ,ovar ',slot)
+                               '#:unbound)
+                          `(ignore-errors ,(second slot)))))))


 (defmacro print-parseable-object ((object stream &key (type t) identity) &rest slots)
ViewGit