add pic_blk_exit

This commit is contained in:
Yuichi Nishiwaki
2014-03-10 01:51:27 +09:00
parent 851187f7bb
commit 68ea22f6eb
2 changed files with 14 additions and 7 deletions
+12 -1
View File
@@ -40,7 +40,7 @@ struct pic_cont {
} while (0)
#define PIC_BLK_DECREF(pic,blk) do { \
pic_block *_a = (blk), *_b; \
pic_block *_a = (blk), *_b; \
while (_a) { \
if (! --_a->refcnt) { \
_b = _a->prev; \
@@ -52,6 +52,17 @@ struct pic_cont {
} \
} while (0)
#define PIC_BLK_EXIT(pic) do { \
pic_block *_a; \
while (pic->blk) { \
if (pic->blk->out) \
pic_apply_argv(pic, pic->blk->out, 0); \
_a = pic->blk->prev; \
PIC_BLK_DECREF(pic, pic->blk); \
pic->blk = _a; \
} \
} while (0)
pic_value pic_values(pic_state *, size_t, ...);
pic_value pic_values_by_array(pic_state *, size_t, pic_value *);
pic_value pic_values_by_list(pic_state *, pic_value);