[Top][All Lists]

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

[Guile-commits] GNU Guile branch, master, updated. release_1-9-10-73-gd2

From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-10-73-gd2b7b76
Date: Tue, 27 Apr 2010 20:55:58 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

The branch, master has been updated
       via  d2b7b761e510e9616db837b2e72819c90a3db25b (commit)
      from  4d67cd4073b43bb48af6c1664357b5e18247e335 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d2b7b761e510e9616db837b2e72819c90a3db25b
Author: Andy Wingo <address@hidden>
Date:   Tue Apr 27 22:57:54 2010 +0200

    add module-export-all!
    * module/ice-9/boot-9.scm (module-export-all!): New function, exports
      all current and future local variables from a module.


Summary of changes:
 module/ice-9/boot-9.scm |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index 05b6a19..d83b0bf 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -3411,6 +3411,20 @@ module '(ice-9 q) '(make-q q-length))}."
                   (module-add! public-i external-name var)))
+;; Export all local variables from a module
+(define (module-export-all! mod)
+  (define (fresh-interface!)
+    (let ((iface (make-module)))
+      (set-module-name! iface (module-name mod))
+      ;; for guile 2: (set-module-version! iface (module-version mod))
+      (set-module-kind! iface 'interface)
+      (set-module-public-interface! mod iface)
+      iface))
+  (let ((iface (or (module-public-interface mod)
+                   (fresh-interface!))))
+    (set-module-obarray! iface (module-obarray mod))))
 ;; Re-export a imported variable
 (define (module-re-export! m names)

GNU Guile

reply via email to

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