From bd70ccb03d30cd3821a2026f0d3b421370e28cc6 Mon Sep 17 00:00:00 2001 From: mainzelm Date: Mon, 14 Apr 2003 11:06:55 +0000 Subject: [PATCH] Limited disclosing of byte-vectors to the first 16 elements. --- scheme/env/disclosers.scm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scheme/env/disclosers.scm b/scheme/env/disclosers.scm index 3054d70..5bcd013 100644 --- a/scheme/env/disclosers.scm +++ b/scheme/env/disclosers.scm @@ -48,12 +48,14 @@ (define-method &disclose ((obj :code-vector)) ; (list 'byte-vector (code-vector-length obj)) - (cons 'byte-vector - (let ((z (code-vector-length obj))) - (do ((i (- z 1) (- i 1)) - (l '() (cons (code-vector-ref obj i) l))) - ((< i 0) l)))) - ) + (let ((z (code-vector-length obj))) + (cons 'byte-vector + (cons (list 'length z) + (do ((i (min (- z 1) 15) (- i 1)) + (l '() (cons (code-vector-ref obj i) l))) + ((< i 0) (if (> z 16) + (append l (list '...)) + l))))))) (define-method &disclose ((obj :channel)) (let ((status (channel-status obj)))