projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93ef7fb
)
Add unparser method to binary ports.
author
Chris Hanson
<org/chris-hanson/cph>
Wed, 11 Jan 2017 06:44:04 +0000
(22:44 -0800)
committer
Chris Hanson
<org/chris-hanson/cph>
Wed, 11 Jan 2017 06:44:04 +0000
(22:44 -0800)
src/runtime/binary-port.scm
patch
|
blob
|
history
diff --git
a/src/runtime/binary-port.scm
b/src/runtime/binary-port.scm
index d7d619ce9febb866483f38a2f87fdfae8949ef05..e7e59769eec62abf259626f77a36e7e1566bfb8b 100644
(file)
--- 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! <binary-port>
+ (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))
\f
;;;; Bytevector input ports