bug-mailutils
[Top][All Lists]
Advanced

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

[PATCH] guile: 'MU_SCM_SYMBOL_VALUE' looks up variables in (mailutils ma


From: Ludovic Courtès
Subject: [PATCH] guile: 'MU_SCM_SYMBOL_VALUE' looks up variables in (mailutils mailutils).
Date: Wed, 1 Sep 2021 17:09:17 +0200

Previously, 'send-message' would lookup 'mu-debug' & co. in the current
module, which is typically the user module.  Users had to define
'mu-debug' in their own module to work around that.
See <https://issues.guix.gnu.org/49968>.

* include/mailutils/guile.h (MU_SCM_SYMBOL_VALUE): Use
'scm_c_public_ref' to ensure P is looked up in (mailutils mailutils)
rather than in the current module.
---
 include/mailutils/guile.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/mailutils/guile.h b/include/mailutils/guile.h
index f05550678..47f89db39 100644
--- a/include/mailutils/guile.h
+++ b/include/mailutils/guile.h
@@ -20,7 +20,8 @@
 
 #include <libguile.h>
 
-#define MU_SCM_SYMBOL_VALUE(p) SCM_VARIABLE_REF(scm_c_lookup(p))
+#define MU_SCM_SYMBOL_VALUE(p)                 \
+  (scm_c_public_ref ("mailutils mailutils", p))
 
 typedef struct
 {
-- 
2.33.0




reply via email to

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