summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-04-08 00:29:52 +0200
committerAndy Wingo <wingo@pobox.com>2010-04-08 00:29:52 +0200
commit8f44138ac6c91d9e20c3557ee6e5389900a7730e (patch)
treeece173599836ba031d76400d62c86d104e7582a4
parentde9df04a0ce8b87e5843b0fcdfcf105437618492 (diff)
downloadguile-8f44138ac6c91d9e20c3557ee6e5389900a7730e.tar.gz
fix bug when importing bindings that were already imported and used
* module/ice-9/boot-9.scm (module-use!, module-use-interfaces!): When adding the module or interface to the use list, clear the cached imports obarray. The test case is coming next.
-rw-r--r--module/ice-9/boot-9.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index f54939361..f0877b7d5 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -1978,7 +1978,7 @@ If there is no handler at all, Guile prints an error and then exits."
(module-name interface))))
(module-uses module))
(list interface)))
-
+ (hash-clear! (module-import-obarray module))
(module-modified module))))
;; MODULE-USE-INTERFACES! module interfaces
@@ -1988,6 +1988,7 @@ If there is no handler at all, Guile prints an error and then exits."
(define (module-use-interfaces! module interfaces)
(set-module-uses! module
(append (module-uses module) interfaces))
+ (hash-clear! (module-import-obarray module))
(module-modified module))