mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
procedure-documentation works on vm procedures
* libguile/procs.c (scm_procedure_documentation): Add a hack so that this function works for compiled procedures too.
This commit is contained in:
parent
6234ff203d
commit
2a0db0e326
1 changed files with 4 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue