cleanup pic_push_try

This commit is contained in:
Yuichi Nishiwaki
2015-06-02 05:14:43 +09:00
parent e0c837baee
commit 1e3bb6f1bb
2 changed files with 7 additions and 9 deletions
+5 -5
View File
@@ -33,11 +33,11 @@ struct pic_error *pic_make_error(pic_state *, pic_sym *, const char *, pic_list)
struct pic_escape *escape = pic_malloc(pic, sizeof(struct pic_escape)); \
pic_save_point(pic, escape); \
if (PIC_SETJMP(pic, (void *)escape->jmp) == 0) { \
pic_push_try(pic, escape); \
do
do { \
pic_push_try(pic, pic_make_econt(pic, escape));
#define pic_catch_(label) \
while (0); \
pic_pop_try(pic); \
pic_pop_try(pic); \
} while (0); \
} else { \
goto label; \
} \
@@ -45,7 +45,7 @@ struct pic_error *pic_make_error(pic_state *, pic_sym *, const char *, pic_list)
if (0) \
label:
void pic_push_try(pic_state *, struct pic_escape *);
void pic_push_try(pic_state *, struct pic_proc *);
void pic_pop_try(pic_state *);
pic_value pic_raise_continuable(pic_state *, pic_value);