mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-18 17:50:29 +02:00
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.
This commit is contained in:
parent
9128b1a19f
commit
bf8328ec16
9 changed files with 100 additions and 20 deletions
|
@ -66,21 +66,6 @@ SCM_DEFINE (scm_thunk_p, "thunk?", 1, 0, 0,
|
|||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
SCM_GLOBAL_SYMBOL (scm_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"
|
||||
"convention, if a procedure contains more than one expression and the\n"
|
||||
"first expression is a string constant, that string is assumed to contain\n"
|
||||
"documentation for that procedure.")
|
||||
#define FUNC_NAME s_scm_procedure_documentation
|
||||
{
|
||||
SCM_VALIDATE_PROC (SCM_ARG1, proc);
|
||||
return scm_procedure_property (proc, scm_sym_documentation);
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
|
||||
/* Procedure-with-setter
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue