unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [PATCH] Fixes for custom-ports
@ 2023-10-29  9:51 Jonas Hahnfeld via Developers list for Guile, the GNU extensibility library
  2023-11-28 21:01 ` Jonas Hahnfeld via Developers list for Guile, the GNU extensibility library
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Jonas Hahnfeld via Developers list for Guile, the GNU extensibility library @ 2023-10-29  9:51 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-devel


[-- Attachment #1.1: Type: text/plain, Size: 205 bytes --]

Hi,

while playing with current Guile main on Windows, I found some problems
in the implementation of custom-ports that was recently committed.
Please consider the attached patches.

Regards
Jonas

[-- Attachment #1.2: 0001-Fix-loading-of-custom-ports-extension.patch --]
[-- Type: text/x-patch, Size: 800 bytes --]

From b5f1013ad969b6e4e35b36dc63798375ffbecda3 Mon Sep 17 00:00:00 2001
From: Jonas Hahnfeld <hahnjo@hahnjo.de>
Date: Tue, 24 Oct 2023 12:47:21 +0200
Subject: [PATCH 1/2] Fix loading of custom-ports extension

* module/ice-9/custom-ports.scm: Load extension also in expand and eval.
---
 module/ice-9/custom-ports.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/module/ice-9/custom-ports.scm b/module/ice-9/custom-ports.scm
index ba50d238a..07b6ba28a 100644
--- a/module/ice-9/custom-ports.scm
+++ b/module/ice-9/custom-ports.scm
@@ -74,7 +74,7 @@
 (define-custom-port-dispatcher truncate length)
 
 
-(eval-when (load)
+(eval-when (expand load eval)
   (load-extension (string-append "libguile-" (effective-version))
                   "scm_init_custom_ports"))
 
-- 
2.42.0


[-- Attachment #1.3: 0002-Match-on-correct-argument-in-make-custom-port.patch --]
[-- Type: text/x-patch, Size: 920 bytes --]

From 78c97b8a49ba336516e954c6c62e4baa7f429f47 Mon Sep 17 00:00:00 2001
From: Jonas Hahnfeld <hahnjo@hahnjo.de>
Date: Tue, 24 Oct 2023 19:24:22 +0200
Subject: [PATCH 2/2] Match on correct argument in make-custom-port

* module/ice-9/custom-ports.scm (make-custom-port): Match on correct
argument for conversion strategy.
---
 module/ice-9/custom-ports.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/module/ice-9/custom-ports.scm b/module/ice-9/custom-ports.scm
index 07b6ba28a..6010fd94f 100644
--- a/module/ice-9/custom-ports.scm
+++ b/module/ice-9/custom-ports.scm
@@ -146,7 +146,7 @@ methods."
       ((? symbol?)
        (string->symbol (string-upcase (symbol->string encoding))))))
   (define (canonicalize-conversion-strategy conversion-strategy)
-    (match encoding
+    (match conversion-strategy
       ('escape 'escape)
       ('substitute 'substitute)
       (_ 'error)))
-- 
2.42.0


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2024-02-11 16:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-29  9:51 [PATCH] Fixes for custom-ports Jonas Hahnfeld via Developers list for Guile, the GNU extensibility library
2023-11-28 21:01 ` Jonas Hahnfeld via Developers list for Guile, the GNU extensibility library
2024-01-04 10:36   ` Jonas Hahnfeld via Developers list for Guile, the GNU extensibility library
2023-11-28 21:11 ` Jean Abou Samra
2023-11-29  6:47   ` Jonas Hahnfeld via Developers list for Guile, the GNU extensibility library
2023-11-29  6:54     ` Jean Abou Samra
2023-11-29  7:26       ` Jonas Hahnfeld via Developers list for Guile, the GNU extensibility library
2024-01-29 13:46 ` Ludovic Courtès
2024-01-29 21:34   ` Jonas Hahnfeld via Developers list for Guile, the GNU extensibility library
2024-02-09  4:47   ` Maxim Cournoyer
2024-02-10 10:08     ` Ludovic Courtès
2024-02-11 16:41       ` Maxim Cournoyer

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