From: Ian Price <ianprice90@googlemail.com>
To: 10616@debbugs.gnu.org
Subject: bug#10616: flush procedure for soft ports isn't called
Date: Fri, 27 Jan 2012 06:27:47 +0000 [thread overview]
Message-ID: <87zkd9y80s.fsf@Kagami.home> (raw)
In-Reply-To: <874nvhzokk.fsf@Kagami.home> (Ian Price's message of "Fri, 27 Jan 2012 05:44:59 +0000")
Ian Price <ianprice90@googlemail.com> writes:
> 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.
OK, so as I understand it, this is supposed to check if there has been a
write to the port. And the buffer will have at most one character in it
because it is set up that way in scm_port_non_buffer.
I notice that sf_write doesn't update this buffer, but instead just
calls the write procedure directly. In that case, it makes sense that
the value isn't changing, and therefore maybe I should just change
sf_flush into a wrapper for the flush procedure?
--
Ian Price
"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"
next prev parent reply other threads:[~2012-01-27 6:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-26 22:10 bug#10616: flush procedure for soft ports isn't called Ian Price
2012-01-27 5:44 ` Ian Price
2012-01-27 6:27 ` Ian Price [this message]
2012-01-27 6:44 ` Ian Price
2012-01-27 20:36 ` Ludovic Courtès
2012-01-27 20:51 ` Ian Price
2012-03-08 5:06 ` Mark H Weaver
2012-03-08 13:53 ` Ludovic Courtès
2012-03-08 15:39 ` Mark H Weaver
2012-03-10 22:14 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zkd9y80s.fsf@Kagami.home \
--to=ianprice90@googlemail.com \
--cc=10616@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).