guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Optimize 'get-bytevector-some'; it may now read less than po


From: Andy Wingo
Subject: Re: [PATCH] Optimize 'get-bytevector-some'; it may now read less than possible
Date: Mon, 01 Apr 2013 21:17:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

On Mon 01 Apr 2013 03:32, Mark H Weaver <address@hidden> writes:

> This patch changes it to simply fill the read buffer (if empty) and then
> copy the contents of the read/putback buffers into a bytevector that is
> never resized.

LGTM; but the docs are a little confusing:

 -- Scheme Procedure: get-bytevector-some port
 -- C Function: scm_get_bytevector_some (port)
     Read from PORT, blocking as necessary, until data are available or
     and end-of-file is reached.  Return either a new bytevector
     containing the data read or the end-of-file object.

The wording is from the R6RS but it seems to imply that we get all data
until the read would block or EOF is reached.  That's not the case, and
it shouldn't be the case.

Andy
-- 
http://wingolog.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]