unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: "Chris K. Jester-Young" <cky944@gmail.com>
To: guile-devel@gnu.org
Subject: Re: [PATCH] Implement efficient 'scm_unget_bytes' and use it
Date: Sat, 6 Apr 2013 03:39:13 -0400	[thread overview]
Message-ID: <20130406073913.GA20669@lotus.destinee.acro.gen.nz> (raw)
In-Reply-To: <87d2u8uq9t.fsf@tines.lan>

On Sat, Apr 06, 2013 at 02:28:14AM -0400, Mark H Weaver wrote:
> This patch implements a function 'scm_unget_bytes' that enables large
> buffers to be unread efficiently.  It keeps the bytes at the end of the
> buffer instead of the beginning, but it can cope if some external code
> manipulates the pushback buffer by hand and puts the bytes at the
> beginning.

Looks good to me! I did write a comment on IRC about how the following
lines

+  if (new_len > pt->read_buf_size)
+    /* The putback buffer needs to be enlarged.  */

used inconsistent references to "read_buf" and "putback buffer", but
I don't think there's a very good solution for that, other than just
making the human reader aware that read_buf _is_ putback_buf in this
context.

Cheers,
Chris.



  reply	other threads:[~2013-04-06  7:39 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 [this message]
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
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=20130406073913.GA20669@lotus.destinee.acro.gen.nz \
    --to=cky944@gmail.com \
    --cc=guile-devel@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).