GNU bug report logs - #10616
flush procedure for soft ports isn't called

Previous Next

Package: guile;

Reported by: Ian Price <ianprice90 <at> googlemail.com>

Date: Thu, 26 Jan 2012 22:19:01 UTC

Severity: normal

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 10616 <at> debbugs.gnu.org (full text, mbox):

From: Ian Price <ianprice90 <at> googlemail.com>
To: 10616 <at> debbugs.gnu.org
Subject: Re: bug#10616: flush procedure for soft ports isn't called
Date: Fri, 27 Jan 2012 05:44:59 +0000
Ian Price <ianprice90 <at> googlemail.com> writes:

> scheme@(guile−user)> (let* ((port (make-soft-port
>                                    (vector #f #f (lambda () 'flushed) #f #f)
>                                    "rw")))
>                        (force-output port))
> scheme@(guile−user)> 

Yak, this example is a horrible one, since force-output doesn't return
the return value of the procedure anyway, but if you try replacing it
with (lambda () (throw 'wontthrow)), and you'll see it doesn't error

In sf_flush in libguile/vports.c, there is a test
  if (pt->write_pos > pt->write_buf)
which some printf debugging tells me is never true, in fact, those
values never change, no matter how much I write to the port. Some food
for thought while I grapple with how the ports code is supposed to work.

-- 
Ian Price

"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"




This bug report was last modified 13 years and 131 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.