1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 03:30:27 +02:00

Fix flush on soft ports, so that it actually runs.

* libguile/vports.c (sf_flush): Remove conditional testing the
  position in the port's write_buf, as it is no longer used.
This commit is contained in:
Ian Price 2012-01-27 06:38:09 +00:00 committed by Mark H Weaver
parent da35d2eaa9
commit be79627c21

View file

@ -56,21 +56,11 @@ sf_flush (SCM port)
scm_t_port *pt = SCM_PTAB_ENTRY (port);
SCM stream = SCM_PACK (pt->stream);
if (pt->write_pos > pt->write_buf)
{
/* write the byte. */
scm_call_1 (SCM_SIMPLE_VECTOR_REF (stream, 0),
SCM_MAKE_CHAR (*pt->write_buf));
pt->write_pos = pt->write_buf;
/* flush the output. */
{
SCM f = SCM_SIMPLE_VECTOR_REF (stream, 2);
SCM f = SCM_SIMPLE_VECTOR_REF (stream, 2);
if (scm_is_true (f))
scm_call_0 (f);
if (scm_is_true (f))
scm_call_0 (f);
}
}
}
static void