summaryrefslogtreecommitdiff
path: root/examples/box-dynamic-module/box-module.scm
diff options
context:
space:
mode:
Diffstat (limited to 'examples/box-dynamic-module/box-module.scm')
-rw-r--r--examples/box-dynamic-module/box-module.scm25
1 files changed, 25 insertions, 0 deletions
diff --git a/examples/box-dynamic-module/box-module.scm b/examples/box-dynamic-module/box-module.scm
new file mode 100644
index 000000000..ab589ba1b
--- /dev/null
+++ b/examples/box-dynamic-module/box-module.scm
@@ -0,0 +1,25 @@
+;;; examples/box-dynamic-module/box-module.scm -- Scheme module exporting
+;;; some functionality from the shared library libbox-module.
+
+;;; Commentary:
+
+;;; This is the Scheme part of the dynamic library module (box-module).
+;;; When you do a (use-modules (box-module)) in this directory,
+;;; this file gets loaded and will load the compiled extension.
+
+;;; Code:
+
+;;; Author: Martin Grabmueller
+;;; Date: 2001-06-06
+
+(define-module (box-module))
+
+;; First, load the library.
+;;
+(load-extension "libbox-module" "scm_init_box")
+
+;; Then export the procedures which should be visible to module users.
+;;
+(export make-box box-ref box-set!)
+
+;;; End of file.