Mercurial > hg > Members > Moririn
diff src/include/origin_cs.h @ 13:a765eb7f3b7c
implement delete, traverse
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 07 Apr 2015 15:39:14 +0900 |
parents | |
children | 907c69e21e56 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/include/origin_cs.h Tue Apr 07 15:39:14 2015 +0900 @@ -0,0 +1,18 @@ +__code start_code(); +__code meta_start_code(); +__code exit_code(); + +__code start_code(Context* context, __code (*next)()) { + goto meta_start_code(context, next); +} + +__code meta_start_code(Context* context, __code (*next)()) { + context->next = next; + goto context->next(context); +} + +__code exit_code(Context* context) { + free(context->ds_heap); + free(context->mds_heap); + goto exit(0); +}