mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-20 14:19:18 +02:00
allowing NULL arg to sexp_load_standard_env, updating to SEXP_SEVEN
This commit is contained in:
parent
69b17aee0d
commit
1b50d709d2
2 changed files with 3 additions and 2 deletions
3
eval.c
3
eval.c
|
@ -377,7 +377,7 @@ sexp sexp_make_eval_context (sexp ctx, sexp stack, sexp env, sexp_uint_t size, s
|
||||||
if (!res || sexp_exceptionp(res))
|
if (!res || sexp_exceptionp(res))
|
||||||
return res;
|
return res;
|
||||||
if (ctx) sexp_gc_preserve1(ctx, res);
|
if (ctx) sexp_gc_preserve1(ctx, res);
|
||||||
sexp_context_env(res) = (env ? env : sexp_make_primitive_env(res, SEXP_FIVE));
|
sexp_context_env(res) = (env ? env : sexp_make_primitive_env(res, SEXP_SEVEN));
|
||||||
sexp_context_bc(res) = sexp_alloc_bytecode(res, SEXP_INIT_BCODE_SIZE);
|
sexp_context_bc(res) = sexp_alloc_bytecode(res, SEXP_INIT_BCODE_SIZE);
|
||||||
sexp_bytecode_name(sexp_context_bc(res)) = SEXP_FALSE;
|
sexp_bytecode_name(sexp_context_bc(res)) = SEXP_FALSE;
|
||||||
sexp_bytecode_length(sexp_context_bc(res)) = SEXP_INIT_BCODE_SIZE;
|
sexp_bytecode_length(sexp_context_bc(res)) = SEXP_INIT_BCODE_SIZE;
|
||||||
|
@ -1656,6 +1656,7 @@ sexp sexp_load_standard_parameters (sexp ctx, sexp env) {
|
||||||
sexp sexp_load_standard_env (sexp ctx, sexp e, sexp version) {
|
sexp sexp_load_standard_env (sexp ctx, sexp e, sexp version) {
|
||||||
sexp_gc_var3(op, tmp, sym);
|
sexp_gc_var3(op, tmp, sym);
|
||||||
sexp_gc_preserve3(ctx, op, tmp, sym);
|
sexp_gc_preserve3(ctx, op, tmp, sym);
|
||||||
|
if (!e) e = sexp_context_env(ctx);
|
||||||
sexp_load_standard_parameters(ctx, e);
|
sexp_load_standard_parameters(ctx, e);
|
||||||
#if SEXP_USE_DL
|
#if SEXP_USE_DL
|
||||||
sexp_env_define(ctx, e, sym=sexp_intern(ctx, "*shared-object-extension*", -1),
|
sexp_env_define(ctx, e, sym=sexp_intern(ctx, "*shared-object-extension*", -1),
|
||||||
|
|
2
main.c
2
main.c
|
@ -119,7 +119,7 @@ static sexp sexp_load_standard_repl_env (sexp ctx, sexp env, sexp k) {
|
||||||
|
|
||||||
#define load_init() if (! init_loaded++) do { \
|
#define load_init() if (! init_loaded++) do { \
|
||||||
init_context(); \
|
init_context(); \
|
||||||
check_exception(ctx, sexp_load_standard_repl_env(ctx, env, SEXP_FIVE)); \
|
check_exception(ctx, sexp_load_standard_repl_env(ctx, env, SEXP_SEVEN)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
void run_main (int argc, char **argv) {
|
void run_main (int argc, char **argv) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue