From 54c9d0796c2d9ebdecf9dd8f2d24dcc5d41bf888 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 31 Jul 2008 05:23:39 +0000 Subject: [PATCH] Closing string and octet ports is a no-op, so don't bother closing in CALL-WITH-INPUT-STRING and CALL-WITH-INPUT-OCTETS. --- v7/src/runtime/stringio.scm | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/v7/src/runtime/stringio.scm b/v7/src/runtime/stringio.scm index 3beb2fdba..68f869f2c 100644 --- a/v7/src/runtime/stringio.scm +++ b/v7/src/runtime/stringio.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: stringio.scm,v 14.4 2008/07/26 07:02:12 cph Exp $ +$Id: stringio.scm,v 14.5 2008/07/31 05:23:39 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -36,10 +36,7 @@ USA. (with-input-from-port (open-input-string string) thunk)) (define (call-with-input-string string procedure) - (let ((port (open-input-string string))) - (let ((value (procedure port))) - (close-input-port port) - value))) + (procedure (open-input-string string))) (define (open-input-string string #!optional start end) (cond ((string? string) @@ -332,10 +329,7 @@ USA. ;;;; Input as byte vector (define (call-with-input-octets octets procedure) - (let ((port (open-input-octets octets))) - (let ((value (procedure port))) - (close-input-port port) - value))) + (procedure (open-input-octets octets))) (define (open-input-octets octets #!optional start end) (guarantee-xstring octets 'OPEN-INPUT-OCTETS) -- 2.25.1