From: "Hannes Müller via Bug reports for GUILE, GNU's Ubiquitous Extension Language" <bug-guile@gnu.org>
To: 75084@debbugs.gnu.org
Subject: bug#75084: bug report with patch 0003-Fix-make-custom-port-in-case-encoding-is-f.patch
Date: Wed, 25 Dec 2024 12:50:13 +0000 [thread overview]
Message-ID: <trinity-93cfa7c9-d4e7-4104-b16c-2054c39da55e-1735131013674@trinity-msg-rest-gmx-gmx-live-bbc95d94c-jjgc7> (raw)
[-- Attachment #1: Type: text/html, Size: 725 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0003-Fix-make-custom-port-in-case-encoding-is-f.patch --]
[-- Type: text/x-patch, Size: 1507 bytes --]
From 72b85f8e6a369e6aef4c6bd6bb233c0cacb80b03 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hannes=20M=C3=BCller?= <>
Date: Sat, 21 Dec 2024 16:55:13 +0100
Subject: [PATCH] Fix make-custom-port in case encoding is #f
* module/ice-9/custom-ports.scm (make-custom-port): Code fails if
(fluid-ref %default-port-encoding) returns #f. In fact this was the
case why readline support on MSYS2 failed for guile 3.0.10, ref.
https://github.com/msys2/MSYS2-packages/issues/5079
But later used canonicalize-encoding is prepared to handle #f for
encoding. So allow encoding to also handle this case.
---
module/ice-9/custom-ports.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/module/ice-9/custom-ports.scm b/module/ice-9/custom-ports.scm
index 6010fd94f..bc9de8f64 100644
--- a/module/ice-9/custom-ports.scm
+++ b/module/ice-9/custom-ports.scm
@@ -127,7 +127,9 @@
(id "custom-port")
(print (make-default-print #:id id))
(truncate default-truncate)
- (encoding (string->symbol (fluid-ref %default-port-encoding)))
+ (encoding (if (string? (fluid-ref %default-port-encoding))
+ (string->symbol (fluid-ref %default-port-encoding))
+ (fluid-ref %default-port-encoding)))
(conversion-strategy (fluid-ref %default-port-conversion-strategy))
(close-on-gc? #f))
"Create a custom port whose behavior is determined by the methods passed
--
2.45.2
reply other threads:[~2024-12-25 12:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=trinity-93cfa7c9-d4e7-4104-b16c-2054c39da55e-1735131013674@trinity-msg-rest-gmx-gmx-live-bbc95d94c-jjgc7 \
--to=bug-guile@gnu.org \
--cc=75084@debbugs.gnu.org \
--cc=h.c.f.mueller@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).