From 3f66b2d32225eb7b034a129bcd8fa7c61f99a47c Mon Sep 17 00:00:00 2001 From: dtc <dtc> Date: Tue, 9 Jan 2001 19:46:57 +0000 Subject: [PATCH] o Correct the printing of instance objects for which the length was being incorrectly calculated. --- lisp/print.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/print.c b/lisp/print.c index e307ee322..a70de3952 100644 --- a/lisp/print.c +++ b/lisp/print.c @@ -1,4 +1,4 @@ -/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/print.c,v 1.12 2000/09/05 09:32:31 dtc Exp $ */ +/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/print.c,v 1.13 2001/01/09 19:46:57 dtc Exp $ */ #include <stdio.h> #include "print.h" @@ -510,7 +510,6 @@ static void print_otherptr(lispobj obj) break; case type_SimpleVector: - case type_InstanceHeader: NEWLINE; printf("length = %ld", length); ptr++; @@ -521,6 +520,16 @@ static void print_otherptr(lispobj obj) } break; + case type_InstanceHeader: + NEWLINE; + printf("length = %ld", count); + index = 0; + while (count-- > 0) { + sprintf(buffer, "%d: ", index++); + print_obj(buffer, *ptr++); + } + break; + case type_SimpleArray: case type_SimpleBitVector: case type_SimpleArrayUnsignedByte2: -- GitLab