call-with-port does not use dynamic-wind to close the port.

This commit is contained in:
Abdulaziz Ghuloum 2008-07-07 00:56:52 -07:00
parent b15c7063f9
commit 8423610f45
2 changed files with 6 additions and 5 deletions

View File

@ -1593,10 +1593,11 @@
(define (call-with-port p proc) (define (call-with-port p proc)
(if (port? p) (if (port? p)
(if (procedure? proc) (if (procedure? proc)
(dynamic-wind (call-with-values
void
(lambda () (proc p)) (lambda () (proc p))
(lambda () (close-port p))) (lambda vals
(close-port p)
(apply values vals)))
(die 'call-with-port "not a procedure" proc)) (die 'call-with-port "not a procedure" proc))
(die 'call-with-port "not a port" p))) (die 'call-with-port "not a port" p)))

View File

@ -1 +1 @@
1529 1530