From 7b851d9bc2d97679a4aa3321972af9fc1b129a1d Mon Sep 17 00:00:00 2001 From: wlott <wlott> Date: Wed, 2 Jun 1993 13:21:25 +0000 Subject: [PATCH] Fixed describe-instance-parts to not flame out when handed instances that don't happen to be defstruct structures. --- code/tty-inspect.lisp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/code/tty-inspect.lisp b/code/tty-inspect.lisp index 719e7d1d8..96840bf04 100644 --- a/code/tty-inspect.lisp +++ b/code/tty-inspect.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/tty-inspect.lisp,v 1.13 1993/05/29 07:01:10 wlott Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/tty-inspect.lisp,v 1.14 1993/06/02 13:21:25 wlott Exp $") ;;; ;;; ********************************************************************** ;;; @@ -171,14 +171,15 @@ (cons "Package" (symbol-package object)))) (defun describe-instance-parts (object kind) - (let ((dd-slots (dd-slots (layout-info (kernel:layout-of object)))) + (let ((info (layout-info (kernel:layout-of object))) (parts-list ())) (push (format nil "~s is a ~(~A~).~%" object kind) parts-list) (push t parts-list) - (dolist (dd-slot dd-slots (nreverse parts-list)) - (push (cons (dsd-%name dd-slot) - (funcall (dsd-accessor dd-slot) object)) - parts-list)))) + (when (kernel::defstruct-description-p info) + (dolist (dd-slot (dd-slots info) (nreverse parts-list)) + (push (cons (dsd-%name dd-slot) + (funcall (dsd-accessor dd-slot) object)) + parts-list))))) (defun describe-function-parts (object) (let* ((type (kernel:get-type object)) -- GitLab