mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-11 15:07:34 +02:00
making literals embedded in the source immutable
This commit is contained in:
parent
638558ebe0
commit
8d5ea4cdf4
1 changed files with 2 additions and 0 deletions
2
eval.c
2
eval.c
|
@ -928,6 +928,8 @@ static sexp analyze (sexp ctx, sexp object) {
|
|||
} else if (sexp_nullp(x)) {
|
||||
res = sexp_compile_error(ctx, "empty application in source", x);
|
||||
} else {
|
||||
if (sexp_pointerp(x)) /* accept vectors and other literals directly, */
|
||||
sexp_immutablep(x) = 1; /* but they must be immutable */
|
||||
res = x;
|
||||
}
|
||||
if (sexp_exceptionp(res) && sexp_not(sexp_exception_source(res))
|
||||
|
|
Loading…
Add table
Reference in a new issue