1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-30 06:50:31 +02:00

Fix example in make-custom-binary-input-port documentation

* doc/ref/api-io.texi (Custom Ports): Add additional argument to example's
  invocation of make-custom-binary-input-port.  Previously had mismatched arity
  by missing "closed" argument.
This commit is contained in:
Christopher Allan Webber 2016-08-11 15:10:19 -05:00 committed by Andy Wingo
parent f46cb25a17
commit cc9e72bd2b

View file

@ -1,7 +1,7 @@
@c -*-texinfo-*- @c -*-texinfo-*-
@c This is part of the GNU Guile Reference Manual. @c This is part of the GNU Guile Reference Manual.
@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2007, 2009, @c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2007, 2009,
@c 2010, 2011, 2013 Free Software Foundation, Inc. @c 2010, 2011, 2013, 2016 Free Software Foundation, Inc.
@c See the file guile.texi for copying conditions. @c See the file guile.texi for copying conditions.
@node Input and Output @node Input and Output
@ -1278,8 +1278,8 @@ procedure (@pxref{Bytevector Ports}) could be implemented as follows:
(set! position new-position)) (set! position new-position))
(make-custom-binary-input-port "the port" read! (make-custom-binary-input-port "the port" read!
get-position get-position set-position!
set-position!)) #f))
(read (open-bytevector-input-port (string->utf8 "hello"))) (read (open-bytevector-input-port (string->utf8 "hello")))
@result{} hello @result{} hello