summaryrefslogtreecommitdiff
path: root/libguile/procs.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-08-19 12:20:58 +0200
committerAndy Wingo <wingo@pobox.com>2009-08-19 12:20:58 +0200
commit2a0db0e326137cbf3b462376872c1d9f06c2bd52 (patch)
tree5d05397c266b20efc157497a2dff106924020292 /libguile/procs.c
parent6234ff203d640f56bc5d160d9fe882b0f02b1401 (diff)
procedure-documentation works on vm procedures
* libguile/procs.c (scm_procedure_documentation): Add a hack so that this function works for compiled procedures too.
Diffstat (limited to 'libguile/procs.c')
-rw-r--r--libguile/procs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libguile/procs.c b/libguile/procs.c
index 93e35ab6c..d873ff55e 100644
--- a/libguile/procs.c
+++ b/libguile/procs.c
@@ -179,6 +179,8 @@ scm_subr_p (SCM obj)
return 0;
}
+SCM_SYMBOL (sym_documentation, "documentation");
+
SCM_DEFINE (scm_procedure_documentation, "procedure-documentation", 1, 0, 0,
(SCM proc),
"Return the documentation string associated with @code{proc}. By\n"
@@ -190,6 +192,8 @@ SCM_DEFINE (scm_procedure_documentation, "procedure-documentation", 1, 0, 0,
SCM code;
SCM_ASSERT (scm_is_true (scm_procedure_p (proc)),
proc, SCM_ARG1, FUNC_NAME);
+ if (SCM_PROGRAM_P (proc))
+ return scm_assq_ref (scm_program_properties (proc), sym_documentation);
switch (SCM_TYP7 (proc))
{
case scm_tcs_closures: