unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#67063: unread-string does not match documented functionality
@ 2023-11-11  4:21 Juliana Sims
  0 siblings, 0 replies; 2+ messages in thread
From: Juliana Sims @ 2023-11-11  4:21 UTC (permalink / raw)
  To: 67063

Hello,

The procedure unread-string is documented to only optionally accept a 
port argument, but the implementation in fact requries it.

I've written a patch to resolve this and will be sending it along 
shortly.

Thanks,
Juli







^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#67063: unread-string does not match documented functionality
  2023-11-11  4:25 ` bug#67064: [PATCH] Fix unread-string Juliana Sims
@ 2024-05-06  9:49   ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2024-05-06  9:49 UTC (permalink / raw)
  To: Juliana Sims; +Cc: 67063-done

[-- Attachment #1: Type: text/plain, Size: 451 bytes --]

Hi Juliana,

Juliana Sims <juli@incana.org> skribis:

> This patch simply fixes bug 67063.
>
> Thanks,
> Juli
>
> * doc/ref/api-io.texi (Venerable Port Interfaces): Bring unread-string
> procedure documentation in line with other procedures in the section.
> * libguile/ports.c (scm_unread_string): Make port argument optional.
> * test-suite/tests/ports.test: Test unread-char and unread-string
> without ports.

Finally applied with these changes:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1080 bytes --]

diff --git a/NEWS b/NEWS
index 8a61bf65d..3c4854ca9 100644
--- a/NEWS
+++ b/NEWS
@@ -59,6 +59,8 @@ files.  See "Random Access" in the manual for details.
    (<https://bugs.gnu.org/55356>)
 ** 'read-u8' in (scheme base) now defaults to (current-input-port)
    (<https://bugs.gnu.org/62690>)
+** Second argument of 'unread-string' is now optional, as previously documented
+   (<https://bugs.gnu.org/67063>)
 ** 'ftw' now correctly deals with directory permissions
    (<https://bugs.gnu.org/55344>)
 ** 'make-custom-port' now honors its #:conversion-strategy argument
diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi
index 3a0f7a9a1..79bc9e9d6 100644
--- a/doc/ref/api-io.texi
+++ b/doc/ref/api-io.texi
@@ -2001,6 +2001,7 @@ current input port, and the arguments are swapped.  @xref{Textual I/O}.
 @end deffn
 
 @deffn {Scheme Procedure} unread-string str [port]
+@deffnx {C Function} scm_unread_string (str, port)
 The same as @code{unget-string}, except that @var{port} defaults to the
 current input port, and the arguments are swapped.  @xref{Textual I/O}.
 @end deffn

[-- Attachment #3: Type: text/plain, Size: 93 bytes --]


Not sure why the C functions aren’t documented for the other ones.

Thanks,
Ludo’.

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-06  9:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-11  4:21 bug#67063: unread-string does not match documented functionality Juliana Sims
     [not found] <handler.67063.B.169967654110222.ack@debbugs.gnu.org>
2023-11-11  4:25 ` bug#67064: [PATCH] Fix unread-string Juliana Sims
2024-05-06  9:49   ` bug#67063: unread-string does not match documented functionality Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).