GNU bug report logs - #62690
Guile 3.0.9 (read-u8) defaults to current-output-port

Previous Next

Package: guile;

Reported by: Rui Zhang <zrui16 <at> hotmail.com>

Date: Thu, 6 Apr 2023 06:26:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 62690 in the body.
You can then email your comments to 62690 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#62690; Package guile. (Thu, 06 Apr 2023 06:26:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rui Zhang <zrui16 <at> hotmail.com>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Thu, 06 Apr 2023 06:26:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Rui Zhang <zrui16 <at> hotmail.com>
To: "bug-guile <at> gnu.org" <bug-guile <at> gnu.org>
Subject: Guile 3.0.9 (read-u8) defaults to current-output-port
Date: Wed, 5 Apr 2023 20:38:28 +0000
Reproduction:

scheme@(guile-user)> (import (scheme base))
scheme@(guile-user)> (read-u8)
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure get-u8: Wrong type argument in position 1 (expecting open input port): #<output: file /dev/pts/9>

Expected: (read-u8) should read a byte from the input port, not the output port.

In scheme/base.scm:

(define* (read-u8 #:optional (port (current-output-port)))
  (get-u8 port))

I think this is a typo, where current-output-port should be current-input-port?

-Rui



Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sun, 16 Jul 2023 20:32:02 GMT) Full text and rfc822 format available.

Notification sent to Rui Zhang <zrui16 <at> hotmail.com>:
bug acknowledged by developer. (Sun, 16 Jul 2023 20:32:02 GMT) Full text and rfc822 format available.

Message #10 received at 62690-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Rui Zhang <zrui16 <at> hotmail.com>
Cc: 62690-done <at> debbugs.gnu.org
Subject: Re: bug#62690: Guile 3.0.9 (read-u8) defaults to current-output-port
Date: Sun, 16 Jul 2023 22:31:32 +0200
Hi,

Rui Zhang <zrui16 <at> hotmail.com> skribis:

> In scheme/base.scm:
>
> (define* (read-u8 #:optional (port (current-output-port)))
>   (get-u8 port))
>
> I think this is a typo, where current-output-port should be current-input-port?

Oops, fixed, thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 14 Aug 2023 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 280 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.