Optimize 'get-bytevector-some'; it may now read less than possible.
authorMark H Weaver <mhw@netris.org>
Mon, 1 Apr 2013 01:21:14 +0000 (21:21 -0400)
committerMark H Weaver <mhw@netris.org>
Mon, 1 Apr 2013 20:46:25 +0000 (16:46 -0400)
commit21bbe22a14a75fab54a5a8563fad63851a18fee3
treeaf9d746151656afb86f8f4b9f0abca4467c78545
parent337edc591ffd8f8ec4176b0112ad10da29818141
Optimize 'get-bytevector-some'; it may now read less than possible.

* libguile/r6rs-ports.c (scm_get_bytevector_some): Rewrite to
  efficiently take the contents of the read/putback buffers.  In the
  docstring, clarify that it might not return all available bytes.

* doc/ref/api-io.texi (R6RS Binary Input): Clarify that
  'get-bytevector-some' might not return all available bytes.

* test-suite/tests/r6rs-ports.test ("get-bytevector-some [only-some]"):
  Remove bogus test, which requires more than the R6RS requires.
doc/ref/api-io.texi
libguile/r6rs-ports.c
test-suite/tests/r6rs-ports.test