unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#41045: transcoded-port turns input/output ports into output ports
@ 2020-05-03  9:07 Göran Weinholt
  0 siblings, 0 replies; only message in thread
From: Göran Weinholt @ 2020-05-03  9:07 UTC (permalink / raw)
  To: 41045

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





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-03  9:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-03  9:07 bug#41045: transcoded-port turns input/output ports into output ports Göran Weinholt

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).