GNU bug report logs - #12216
peek-char incorrectly *CONSUMES* eof

Previous Next

Package: guile;

Reported by: dwheeler <at> dwheeler.com

Date: Fri, 17 Aug 2012 02:03:01 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "David A. Wheeler" <dwheeler <at> dwheeler.com>
To: "mhw" <mhw <at> netris.org>
Cc: wingo <wingo <at> pobox.com>, almkglor <almkglor <at> gmail.com>, 12216 <12216 <at> debbugs.gnu.org>
Subject: bug#12216: peek-char incorrectly *CONSUMES* eof
Date: Thu, 14 Mar 2013 13:43:01 -0400 (EDT)
On Thu, 14 Mar 2013 13:13:39 -0400, Mark H Weaver <mhw <at> netris.org> wrote:
> One extra check per read primitive is hardly enough of a cost to
> consider abandoning correctness, IMO.

Though I've not reviewed this code, I *think* you'd only need to check when the buffer is empty.  When the buffer is empty, it'll take a while for the OS to fill it anyway, far more than checking a boolean value.

--- David A. Wheeler




This bug report was last modified 12 years and 50 days ago.

Previous Next


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