mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 14:49:18 +02:00
GC preserving in/out/err in REPL.
This commit is contained in:
parent
c2b6dfbf33
commit
8eb74156f9
1 changed files with 3 additions and 4 deletions
7
main.c
7
main.c
|
@ -175,9 +175,8 @@ static sexp sexp_param_ref (sexp ctx, sexp env, sexp name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void repl (sexp ctx, sexp env) {
|
static void repl (sexp ctx, sexp env) {
|
||||||
sexp in, out, err;
|
sexp_gc_var6(obj, tmp, res, in, out, err);
|
||||||
sexp_gc_var3(obj, tmp, res);
|
sexp_gc_preserve6(ctx, obj, tmp, res, in, out, err);
|
||||||
sexp_gc_preserve3(ctx, obj, tmp, res);
|
|
||||||
sexp_context_tracep(ctx) = 1;
|
sexp_context_tracep(ctx) = 1;
|
||||||
in = sexp_param_ref(ctx, env, sexp_global(ctx, SEXP_G_CUR_IN_SYMBOL));
|
in = sexp_param_ref(ctx, env, sexp_global(ctx, SEXP_G_CUR_IN_SYMBOL));
|
||||||
out = sexp_param_ref(ctx, env, sexp_global(ctx, SEXP_G_CUR_OUT_SYMBOL));
|
out = sexp_param_ref(ctx, env, sexp_global(ctx, SEXP_G_CUR_OUT_SYMBOL));
|
||||||
|
@ -213,7 +212,7 @@ static void repl (sexp ctx, sexp env) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sexp_gc_release3(ctx);
|
sexp_gc_release6(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ! SEXP_USE_BOEHM
|
#if ! SEXP_USE_BOEHM
|
||||||
|
|
Loading…
Add table
Reference in a new issue