summaryrefslogtreecommitdiff
path: root/doc/ref/api-io.texi
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2013-03-31 21:21:14 -0400
committerMark H Weaver <mhw@netris.org>2013-04-01 16:46:25 -0400
commit21bbe22a14a75fab54a5a8563fad63851a18fee3 (patch)
treeaf9d746151656afb86f8f4b9f0abca4467c78545 /doc/ref/api-io.texi
parent337edc591ffd8f8ec4176b0112ad10da29818141 (diff)
downloadguile-21bbe22a14a75fab54a5a8563fad63851a18fee3.tar.gz
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.
Diffstat (limited to 'doc/ref/api-io.texi')
-rw-r--r--doc/ref/api-io.texi7
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi
index 11ae5803a..8c974be5f 100644
--- a/doc/ref/api-io.texi
+++ b/doc/ref/api-io.texi
@@ -1833,9 +1833,10 @@ actually read or the end-of-file object.
@deffn {Scheme Procedure} get-bytevector-some port
@deffnx {C Function} scm_get_bytevector_some (port)
-Read from @var{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.
+Read from @var{port}, blocking as necessary, until bytes are available
+or an end-of-file is reached. Return either the end-of-file object or a
+new bytevector containing some of the available bytes (at least one),
+and update the port position to point just past these bytes.
@end deffn
@deffn {Scheme Procedure} get-bytevector-all port