Commit 2000e6df authored by Breanndán Ó Nualláin's avatar Breanndán Ó Nualláin
Browse files

Close stream for IN-FILE but not IN-STREAM

Previously the following code would fail since S was closed
after the first ITER.

(progn (iter (for line in-stream s)
             (for n below 2))
       (iter (for line in-stream s)
             (for n below 2)))
parent a1c47b2b
......@@ -2693,11 +2693,12 @@ e.g. (DSETQ (VALUES (a . b) nil c) form)"
reader stream-var nil `',eof))
',eof) (go ,*loop-end*))
:final-protected `((if (streamp ,stream-var)
(close ,stream-var)))
:final-protected (when (eq stream-or-file :file)
`((if (streamp ,stream-var)
(close ,stream-var))))
:variable var)))
;;; (FOR NEXT)
(defclause-driver (for var next next)
"General driver; VAR is set to value of NEXT"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment