diff options
author | Andy Wingo <wingo@pobox.com> | 2010-02-25 17:33:12 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-02-26 11:05:44 +0100 |
commit | d296431516dbf14535fc6eaba551fede19c09772 (patch) | |
tree | 462156635e207a35b0f03d7bb044833278467c72 /libguile/eval.c | |
parent | b8af64db76bc602517be300128be0dfb67fac89f (diff) | |
download | guile-d296431516dbf14535fc6eaba551fede19c09772.tar.gz |
fix a prompt bug
* libguile/control.h:
* libguile/control.c (scm_c_make_prompt): Instead of taking a VM arg,
take the registers directly.
(scm_c_abort): Declare as returning void. In fact it will never
return.
* libguile/eval.c (eval):
* libguile/throw.c (pre_init_catch): Adapt to prompt API change.
* libguile/vm-i-system.c (prompt): Pass the abort ip as the ip to
scm_c_make_prompt. This fixes a bug in which we used the "offset"
local var, but it wasn't guaranteed to be around after a longjmp.
Diffstat (limited to 'libguile/eval.c')
-rw-r--r-- | libguile/eval.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libguile/eval.c b/libguile/eval.c index dff0372a2..1dc2bc4cd 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -427,9 +427,12 @@ eval (SCM x, SCM env) case SCM_M_PROMPT: { - SCM prompt, handler, res; + SCM vm, prompt, handler, res; - prompt = scm_c_make_prompt (scm_the_vm (), eval (CAR (mx), env), 0, -1); + vm = scm_the_vm (); + prompt = scm_c_make_prompt (eval (CAR (mx), env), SCM_VM_DATA (vm)->fp, + SCM_VM_DATA (vm)->sp, SCM_VM_DATA (vm)->ip, + 0, -1); handler = eval (CDDR (mx), env); scm_i_set_dynwinds (scm_cons (prompt, scm_i_dynwinds ())); |