unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Mike Gran <spk121@yahoo.com>
Cc: "guile-devel@gnu.org" <guile-devel@gnu.org>
Subject: Re: [PATCH] Implement efficient 'scm_unget_bytes' and 'unget-bytevector'
Date: Sat, 06 Apr 2013 10:08:22 -0400	[thread overview]
Message-ID: <874nfjvjjd.fsf@tines.lan> (raw)
In-Reply-To: <1365242511.85453.YahooMailNeo@web120404.mail.ne1.yahoo.com> (Mike Gran's message of "Sat, 6 Apr 2013 03:01:51 -0700 (PDT)")

Mike Gran <spk121@yahoo.com> writes:

> It is true that none of Guile's clients ever look at putback_buf?

I'm assuming the worst: that Guile's clients might look at, and
manipulate the 'putback_buf' directly.  The way I'm filling
'putback_buf' can *already* happen today.

Here's how it can happen today: unget enough bytes to exactly fill
'putback_buf', and then read some of those bytes.  That will result in
*exactly* the same putback buffer state as what I'm doing here.

> Have you checked that it works with gnome-vfs-port in guile-gnome?

*sigh*  I just looked at that code, and it doesn't do anything the
least bit unusual with the buffers.  No, I didn't run a test with that
code, but even if I did, that wouldn't answer the question of whether
there exists code out there that would be broken by this change.  For
that, only the logic above can help.

Again, the state I'm putting the buffers in can already happen today.
Any code that can't cope with that state is already a ticking time bomb.

      Mark



  reply	other threads:[~2013-04-06 14:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-06  6:28 [PATCH] Implement efficient 'scm_unget_bytes' and use it Mark H Weaver
2013-04-06  7:39 ` Chris K. Jester-Young
2013-04-06  7:47 ` [PATCH] Implement efficient 'scm_unget_bytes' and 'unget-bytevector' Mark H Weaver
2013-04-06 10:01   ` Mike Gran
2013-04-06 14:08     ` Mark H Weaver [this message]
2013-04-06 23:07   ` Ludovic Courtès
2013-04-07  7:19     ` Mark H Weaver
2013-04-07  9:28       ` Ludovic Courtès
2013-04-07 13:01         ` Mark H Weaver
2013-04-07 14:25           ` 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=874nfjvjjd.fsf@tines.lan \
    --to=mhw@netris.org \
    --cc=guile-devel@gnu.org \
    --cc=spk121@yahoo.com \
    /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).