mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-14 08:27:34 +02:00
fixing memory leak when redefining macros
(was generating a new env cell instead of overwriting the old one)
This commit is contained in:
parent
9a052ddb7c
commit
565ed858fe
1 changed files with 1 additions and 1 deletions
2
eval.c
2
eval.c
|
@ -665,7 +665,7 @@ static sexp analyze_bind_syntax (sexp ls, sexp eval_ctx, sexp bind_ctx) {
|
|||
if (sexp_synclop(name) && sexp_env_global_p(sexp_context_env(bind_ctx)))
|
||||
name = sexp_synclo_expr(name);
|
||||
mac = sexp_make_macro(eval_ctx, proc, sexp_context_env(bind_ctx));
|
||||
sexp_env_push(eval_ctx, sexp_context_env(bind_ctx), tmp, name, mac);
|
||||
sexp_env_define(eval_ctx, sexp_context_env(bind_ctx), name, mac);
|
||||
} else {
|
||||
res = (sexp_exceptionp(proc) ? proc
|
||||
: sexp_compile_error(eval_ctx, "non-procedure macro:", proc));
|
||||
|
|
Loading…
Add table
Reference in a new issue