From: Chris Hanson Date: Wed, 11 Jan 2017 06:44:04 +0000 (-0800) Subject: Add unparser method to binary ports. X-Git-Tag: mit-scheme-pucked-9.2.12~227^2~158 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=73b76d7aca3938106f52eec5ad3cee1b3305ec84;p=mit-scheme.git Add unparser method to binary ports. --- 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