mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
allow eval to be called before modules are booted
* libguile/eval.c (scm_eval): If the module system isn't booted, assert not on the module argument.
This commit is contained in:
parent
ae6bba7f9c
commit
181f1cd7d0
1 changed files with 2 additions and 1 deletions
|
@ -4109,11 +4109,12 @@ SCM_DEFINE (scm_eval, "eval", 2, 0, 0,
|
||||||
scm_dynwind_begin (SCM_F_DYNWIND_REWINDABLE);
|
scm_dynwind_begin (SCM_F_DYNWIND_REWINDABLE);
|
||||||
if (scm_is_dynamic_state (module_or_state))
|
if (scm_is_dynamic_state (module_or_state))
|
||||||
scm_dynwind_current_dynamic_state (module_or_state);
|
scm_dynwind_current_dynamic_state (module_or_state);
|
||||||
else
|
else if (scm_module_system_booted_p)
|
||||||
{
|
{
|
||||||
SCM_VALIDATE_MODULE (2, module_or_state);
|
SCM_VALIDATE_MODULE (2, module_or_state);
|
||||||
scm_dynwind_current_module (module_or_state);
|
scm_dynwind_current_module (module_or_state);
|
||||||
}
|
}
|
||||||
|
/* otherwise if the module system isn't booted, ignore the module arg */
|
||||||
|
|
||||||
res = scm_primitive_eval (exp);
|
res = scm_primitive_eval (exp);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue