1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 04:10:18 +02:00

* eval.c (scm_ceval, scm_deval): When evaluating expressions on

top level, create a fresh top-level environment for each
expression instead of mutating the exisint frame.  This is
important when that frame is closed over.
This commit is contained in:
Marius Vollmer 2001-02-22 20:54:12 +00:00
parent 0ba8a0a583
commit 23c46fa69a

View file

@ -1913,12 +1913,12 @@ dispatch:
t.arg1 = x;
while (SCM_NNULLP (t.arg1 = SCM_CDR (t.arg1)))
{
SCM_SETCAR (env, scm_current_module_lookup_closure ());
env = scm_top_level_env (scm_current_module_lookup_closure ());
SIDEVAL (SCM_CAR(x), env);
x = t.arg1;
}
/* once more, for the last form */
SCM_SETCAR (env, scm_current_module_lookup_closure ());
env = scm_top_level_env (scm_current_module_lookup_closure ());
}
else
{