fixing bug in with-input-from-file
This commit is contained in:
parent
929ec92a65
commit
b59dcdc877
|
@ -135,7 +135,7 @@
|
|||
(define (with-input-from-file name thunk)
|
||||
(let ((f (file name :read)))
|
||||
(unwind-protect
|
||||
(with-output-to f (thunk))
|
||||
(with-input-from f (thunk))
|
||||
(io.close f))))
|
||||
|
||||
(define (call-with-input-file name proc)
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -552,6 +552,9 @@
|
|||
(define-macro (with-output-to stream . body)
|
||||
`(with-bindings ((*output-stream* ,stream))
|
||||
,@body))
|
||||
(define-macro (with-input-from stream . body)
|
||||
`(with-bindings ((*input-stream* ,stream))
|
||||
,@body))
|
||||
|
||||
; vector functions ------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue