Custom textual output port not recognized as a textual port
Bug #175517 reported by
Derick Eddington
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ikarus Scheme |
Fix Released
|
Medium
|
Abdulaziz Ghuloum |
Bug Description
Ikarus Scheme version 0.0.2patched+ (revision 1222, build 2007-12-11)
Copyright (c) 2006-2007 Abdulaziz Ghuloum
> (define ctop
(make-
"ctop"
(lambda (str start count)
(printf "*** (write! ~s)\n" (substring str start (+ start count)))
count)
#f #f #f))
> (write 'blah ctop)
*** (write! "blah")
> (newline ctop)
Unhandled exception
Condition components:
1. &error
2. &who: newline
3. &message: "not a textual port"
4. &irritants: (#<output-port "ctop">)
>
Changed in ikarus: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Fixed in revision 1223. Thanks.
> (define ctop custom- textual- output- port
(make-
"ctop"
(lambda (str start count)
(printf "*** (write! ~s)\n" (substring str start (+ start count)))
count)
#f #f #f))
> (textual-port? ctop)
#t
> (binary-port? ctop)
#f
> (write 'blah ctop)
*** (write! "blah")
> (newline ctop)
*** (write! "\n")