From b91999543d9cb5be40a8289d0463c1a9ae689a88 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Tue, 19 Dec 2017 14:15:22 +0000 Subject: [PATCH] Call close-textual-in/output-port, not close-in/output-port. Former is noop for non-input or non-output port; latter is error. Fixes close-port on something that is only a textual input port or only a textual output port. --- src/runtime/port.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/port.scm b/src/runtime/port.scm index df3eed44c..4e1e527c7 100644 --- a/src/runtime/port.scm +++ b/src/runtime/port.scm @@ -439,8 +439,8 @@ USA. (if close (close port) (begin - (close-output-port port) - (close-input-port port))))) + (close-textual-output-port port) + (close-textual-input-port port))))) (define (close-textual-input-port port) (let ((close-input (textual-port-operation port 'CLOSE-INPUT))) -- 2.25.1