diff --git a/lib/cont.c b/lib/cont.c index 91fb04dc..96ae47ea 100644 --- a/lib/cont.c +++ b/lib/cont.c @@ -51,10 +51,10 @@ cont_call(pic_state *pic) } pic_value -pic_make_cont(pic_state *pic, struct context *cxt, pic_value k, pic_value dyn_env) +pic_make_cont(pic_state *pic, pic_value k) { static const pic_data_type cxt_type = { "cxt", NULL }; - return pic_lambda(pic, cont_call, 3, pic_data_value(pic, cxt, &cxt_type), k, dyn_env); + return pic_lambda(pic, cont_call, 3, pic_data_value(pic, pic->cxt, &cxt_type), k, pic->dyn_env); } static pic_value @@ -64,7 +64,7 @@ pic_cont_callcc(pic_state *pic) pic_get_args(pic, "l", &f); - args[0] = pic_make_cont(pic, pic->cxt, pic->cxt->fp->regs[1], pic->dyn_env); + args[0] = pic_make_cont(pic, pic->cxt->fp->regs[1]); return pic_applyk(pic, f, 1, args); } diff --git a/lib/error.c b/lib/error.c index 6694eb90..250b842a 100644 --- a/lib/error.c +++ b/lib/error.c @@ -69,7 +69,7 @@ pic_enter_try(pic_state *pic) pic->cxt->ai = pic->ai; /* call/cc */ - cont = pic_make_cont(pic, pic->cxt, pic_invalid_value(pic), pic->dyn_env); + cont = pic_make_cont(pic, pic_invalid_value(pic)); handler = pic_lambda(pic, native_exception_handler, 1, cont); /* with-exception-handler */ var = pic_exc(pic); diff --git a/lib/object.h b/lib/object.h index e066c7d4..0269ac62 100644 --- a/lib/object.h +++ b/lib/object.h @@ -271,8 +271,7 @@ pic_value pic_make_proc_func(pic_state *, pic_func_t); pic_value pic_make_record(pic_state *, pic_value type, pic_value datum); pic_value pic_record_type(pic_state *pic, pic_value record); pic_value pic_record_datum(pic_state *pic, pic_value record); -struct context; -pic_value pic_make_cont(pic_state *pic, struct context *cxt, pic_value k, pic_value dyn_env); +pic_value pic_make_cont(pic_state *pic, pic_value k); pic_value pic_make_error(pic_state *, const char *type, const char *msg, pic_value irrs); struct rope *pic_rope_incref(struct rope *);