bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41045: transcoded-port turns input/output ports into output ports


From: Göran Weinholt
Subject: bug#41045: transcoded-port turns input/output ports into output ports
Date: Sun, 03 May 2020 11:07:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hello schemers,

The transcoded-port procedure from (rnrs) does not handle input/output
ports properly:

--8<---------------cut here---------------start------------->8---
GNU Guile 3.0.2
Copyright (C) 1995-2020 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (import (rnrs))
scheme@(guile-user)> (define p (open-file-input/output-port "/dev/null" 
(file-options no-fail)))
scheme@(guile-user)> (define tp (transcoded-port p (native-transcoder)))
scheme@(guile-user)> (values (output-port? tp) (input-port? tp))
$1 = #t
$2 = #f
--8<---------------cut here---------------end--------------->8---

Both return values should be #t.

-- 
Göran Weinholt   | https://weinholt.se/
Debian developer | 73 de SA6CJK





reply via email to

[Prev in Thread] Current Thread [Next in Thread]