From 73b76d7aca3938106f52eec5ad3cee1b3305ec84 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 10 Jan 2017 22:44:04 -0800 Subject: [PATCH] Add unparser method to binary ports. --- src/runtime/binary-port.scm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/runtime/binary-port.scm b/src/runtime/binary-port.scm index d7d619ce9..e7e59769e 100644 --- a/src/runtime/binary-port.scm +++ b/src/runtime/binary-port.scm @@ -81,6 +81,15 @@ USA. '<= binary-port?) (register-predicate! binary-i/o-port? 'binary-i/o-port '<= (list binary-input-port? binary-output-port?)))) + +(set-record-type-unparser-method! + (standard-unparser-method + (lambda (port) + (cond ((binary-i/o-port? port) 'BINARY-I/O-PORT) + ((binary-input-port? port) 'BINARY-INPUT-PORT) + ((binary-output-port? port) 'BINARY-OUTPUT-PORT) + (else 'BINARY-PORT))) + #f)) ;;;; Bytevector input ports -- 2.25.1