summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-03-30 21:20:44 -0700
committerAndy Wingo <wingo@pobox.com>2009-04-17 15:20:17 +0200
commitdaedb4920acdf6db31c375b4fdd142b002ddc77a (patch)
tree635e99ba3cb9a1ba8e644073c19fc2efac852d6b
parent4e237f1460c06c8e13dd2db4a2c690342a532664 (diff)
downloadguile-daedb4920acdf6db31c375b4fdd142b002ddc77a.tar.gz
eval-closure-module, here hopefully not for long
* libguile/modules.h: * libguile/modules.c (scm_eval_closure_module): Define a new-yet-deprecated accessor, to ease a transition.
-rw-r--r--libguile/modules.c15
-rw-r--r--libguile/modules.h1
2 files changed, 16 insertions, 0 deletions
diff --git a/libguile/modules.c b/libguile/modules.c
index beee0e2a5..428cb607d 100644
--- a/libguile/modules.c
+++ b/libguile/modules.c
@@ -544,6 +544,21 @@ SCM_DEFINE (scm_standard_interface_eval_closure,
}
#undef FUNC_NAME
+SCM_DEFINE (scm_eval_closure_module,
+ "eval-closure-module", 1, 0, 0,
+ (SCM eval_closure),
+ "Return the module associated with this eval closure.")
+/* the idea is that eval closures are really not the way to do things, they're
+ superfluous given our module system. this function lets mmacros migrate away
+ from eval closures. */
+#define FUNC_NAME s_scm_eval_closure_module
+{
+ SCM_MAKE_VALIDATE_MSG (SCM_ARG1, eval_closure, EVAL_CLOSURE_P,
+ "eval-closure");
+ return SCM_SMOB_OBJECT (eval_closure);
+}
+#undef FUNC_NAME
+
SCM
scm_module_lookup_closure (SCM module)
{
diff --git a/libguile/modules.h b/libguile/modules.h
index 4f42e1888..3cd090476 100644
--- a/libguile/modules.h
+++ b/libguile/modules.h
@@ -109,6 +109,7 @@ SCM_API SCM scm_current_module_transformer (void);
SCM_API SCM scm_eval_closure_lookup (SCM eclo, SCM sym, SCM definep);
SCM_API SCM scm_standard_eval_closure (SCM module);
SCM_API SCM scm_standard_interface_eval_closure (SCM module);
+SCM_API SCM scm_eval_closure_module (SCM eval_closure); /* deprecated already */
SCM_API SCM scm_get_pre_modules_obarray (void);
SCM_API SCM scm_lookup_closure_module (SCM proc);