Hi,

Kevin Ryde <[EMAIL PROTECTED]> writes:

> Actually I see the flush func of a soft port is entirely unused, it's
> never called by a force-output because nothing is ever put in the port
> buffer as such.  The manual could be clearer about what it's supposed to
> be for :-(.

Maybe that's a bug, maybe it was meant to be called.  We could fix this
in HEAD, but maybe not in 1.8, in case programs rely on it.

> At any rate, I put in the failing test below for port-for-each, and I
> think flush-all could benefit from the rewrite below, just on general
> principles.

I agree with the latter.

> +(with-test-prefix "port-for-each"
> +
> +  ;; In guile 1.8.0 through 1.8.2, port-for-each could pass a freed cell to
> +  ;; its iterator func if a port was inaccessible in the last gc mark but
> +  ;; the lazy sweeping has not yet reached it to remove it from the port
> +  ;; table (scm_i_port_table).  Provoking those gc conditions is a little
> +  ;; tricky, but the following code made it happen in 1.8.2.
> +  (pass-if "passing freed cell"
> +    (throw 'unresolved)

The above line should be removed.  :-)

Once this line is removed, the test fails consistently here (HEAD),
which is good news I suppose.

> +      (open-input-file "/dev/null")

`(%make-void-port "r")' would have the same effect but would be more
portable.

Thanks,
Ludovic.



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel

Reply via email to