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

@ -1592,11 +1592,12 @@
(define (call-with-port p proc)
(if (port? p)
(if (procedure? proc)
(dynamic-wind
void
(if (procedure? proc)
(call-with-values
(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 port" p)))

View File

@ -1 +1 @@
1529
1530