diff options
author | Andy Wingo <wingo@pobox.com> | 2013-05-16 23:38:29 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-06-09 23:59:01 +0200 |
commit | bf8328ec16cbe76b7af9703bb41e964865034561 (patch) | |
tree | 53957dcaa2955689353c2cab6c8435b190fb1978 /libguile/programs.c | |
parent | 9128b1a19fe89de1aacafe5ccffd06e193f531bc (diff) | |
download | guile-bf8328ec16cbe76b7af9703bb41e964865034561.tar.gz |
procedure-documentation works on RTL procedures
* libguile/procprop.h:
* libguile/procprop.c (scm_procedure_documentation): Move here from
procs.c, and to make the logic more similar to that of procedure-name,
which allows RTL programs to dispatch to rtl-program-documentation.
* libguile/programs.c (scm_i_rtl_program_documentation):
* libguile/programs.h:
* module/system/vm/program.scm (rtl-program-documentation): New
plumbing.
* module/system/vm/debug.scm (find-program-docstring): New interface to
grovel ELF for a docstring.
Diffstat (limited to 'libguile/programs.c')
-rw-r--r-- | libguile/programs.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libguile/programs.c b/libguile/programs.c index 12561b30d..567708a51 100644 --- a/libguile/programs.c +++ b/libguile/programs.c @@ -123,6 +123,19 @@ scm_i_rtl_program_name (SCM program) return scm_call_1 (scm_variable_ref (rtl_program_name), program); } +SCM +scm_i_rtl_program_documentation (SCM program) +{ + static SCM rtl_program_documentation = SCM_BOOL_F; + + if (scm_is_false (rtl_program_documentation) && scm_module_system_booted_p) + rtl_program_documentation = + scm_c_private_variable ("system vm program", + "rtl-program-documentation"); + + return scm_call_1 (scm_variable_ref (rtl_program_documentation), program); +} + void scm_i_program_print (SCM program, SCM port, scm_print_state *pstate) { |