unpublish pic_wind

This commit is contained in:
Yuichi Nishiwaki 2014-09-18 19:26:58 +09:00
parent 7e3d33d86c
commit 17602a5c8d
2 changed files with 5 additions and 6 deletions

10
cont.c
View File

@ -205,19 +205,19 @@ restore_cont(pic_state *pic, struct pic_cont *cont)
longjmp(tmp->jmp, 1);
}
void
pic_wind(pic_state *pic, struct pic_winder *here, struct pic_winder *there)
static void
do_wind(pic_state *pic, struct pic_winder *here, struct pic_winder *there)
{
if (here == there)
return;
if (here->depth < there->depth) {
pic_wind(pic, here, there->prev);
do_wind(pic, here, there->prev);
pic_apply0(pic, there->in);
}
else {
pic_apply0(pic, there->out);
pic_wind(pic, here->prev, there);
do_wind(pic, here->prev, there);
}
}
@ -264,7 +264,7 @@ cont_call(pic_state *pic)
cont->results = pic_list_by_array(pic, argc, argv);
/* execute guard handlers */
pic_wind(pic, pic->wind, cont->wind);
do_wind(pic, pic->wind, cont->wind);
restore_cont(pic, cont);
}

View File

@ -47,7 +47,6 @@ pic_value pic_values_by_list(pic_state *, pic_value);
size_t pic_receive(pic_state *, size_t, pic_value *);
pic_value pic_callcc(pic_state *, struct pic_proc *);
void pic_wind(pic_state *, struct pic_winder *, struct pic_winder *);
#if defined(__cplusplus)
}