config env doesn't copy the core env, it just links to it as a parent

This commit is contained in:
Alex Shinn 2009-12-20 13:27:30 +09:00
parent 427eb51ad6
commit c895db6c48

2
eval.c
View file

@ -2512,7 +2512,7 @@ sexp sexp_load_standard_env (sexp ctx, sexp e, sexp version) {
tmp = sexp_make_env(ctx); tmp = sexp_make_env(ctx);
if (! sexp_exceptionp(tmp)) { if (! sexp_exceptionp(tmp)) {
sexp_global(ctx, SEXP_G_CONFIG_ENV) = tmp; sexp_global(ctx, SEXP_G_CONFIG_ENV) = tmp;
sexp_env_copy(ctx, tmp, e, SEXP_FALSE); sexp_env_parent(tmp) = e;
op = sexp_load_module_file(ctx, sexp_config_file, tmp); op = sexp_load_module_file(ctx, sexp_config_file, tmp);
if (sexp_exceptionp(op)) if (sexp_exceptionp(op))
sexp_print_exception(ctx, op, sexp_current_error_port(ctx)); sexp_print_exception(ctx, op, sexp_current_error_port(ctx));