guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 02/07: 'module-define!' honors the 'module' parameter.


From: Ludovic Courtès
Subject: [Guile-commits] 02/07: 'module-define!' honors the 'module' parameter.
Date: Thu, 16 Jun 2022 04:06:51 -0400 (EDT)

civodul pushed a commit to branch main
in repository guile.

commit e8a41aee2932d1332cd4010398c41be56d4c4be3
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Jun 16 09:30:03 2022 +0200

    'module-define!' honors the 'module' parameter.
    
    * module/ice-9/boot-9.scm (module-define!): In 'module-add!' call, pass
    MODULE rather than (current-module).
---
 module/ice-9/boot-9.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index 2323b1ec5..a46145ed5 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -1,6 +1,6 @@
 ;;; -*- mode: scheme; coding: utf-8; -*-
 
-;;;; Copyright (C) 1995-2014, 2016-2021  Free Software Foundation, Inc.
+;;;; Copyright (C) 1995-2014, 2016-2022  Free Software Foundation, Inc.
 ;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -361,7 +361,7 @@ If returning early, return the return value of F."
   (let ((v (hashq-ref (%get-pre-modules-obarray) sym)))
     (if v
         (variable-set! v val)
-        (module-add! (current-module) sym (make-variable val)))))
+        (module-add! module sym (make-variable val)))))
 (define (module-ref module sym)
   (let ((v (module-variable module sym)))
     (if v (variable-ref v) (error "badness!" (pk module) (pk sym)))))



reply via email to

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