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 via email to