mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-23 20:05:32 +02:00
no positions when reading psyntax-pp, validation in @/@@, cleanups
* module/ice-9/syncase.scm (old-debug): Re-disable position recording when reading psyntax-pp. * libguile/eval.c (scm_m_at, scm_m_atat): More input validation. * libguile/debug.c (scm_procedure_module): Use scm_env_module. Remove extraneous docstring.
This commit is contained in:
parent
c5cc65ac0c
commit
69dd78d7c8
3 changed files with 6 additions and 20 deletions
|
@ -402,9 +402,7 @@ SCM_DEFINE (scm_procedure_environment, "procedure-environment", 1, 0, 0,
|
|||
|
||||
SCM_DEFINE (scm_procedure_module, "procedure-module", 1, 0, 0,
|
||||
(SCM proc),
|
||||
"Return the module that was current when this procedure was defined.\n"
|
||||
"Free variables in this procedure are resolved relative to the\n"
|
||||
"procedure's module.")
|
||||
"Return the module that was current when @var{proc} was defined.")
|
||||
#define FUNC_NAME s_scm_procedure_module
|
||||
{
|
||||
SCM_VALIDATE_PROC (SCM_ARG1, proc);
|
||||
|
@ -412,21 +410,7 @@ SCM_DEFINE (scm_procedure_module, "procedure-module", 1, 0, 0,
|
|||
if (scm_is_true (scm_program_p (proc)))
|
||||
return scm_program_module (proc);
|
||||
else
|
||||
{
|
||||
SCM env = scm_procedure_environment (proc);
|
||||
|
||||
if (scm_is_null (env))
|
||||
return SCM_BOOL_F;
|
||||
else
|
||||
{
|
||||
for (; !scm_is_null (scm_cdr (env)); env = scm_cdr (env))
|
||||
;
|
||||
if (SCM_EVAL_CLOSURE_P (scm_car (env)))
|
||||
return SCM_PACK (SCM_SMOB_DATA (scm_car (env)));
|
||||
else
|
||||
return SCM_BOOL_F;
|
||||
}
|
||||
}
|
||||
return scm_env_module (scm_procedure_environment (proc));
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue