Mercurial > hg > GearsTemplate
changeset 53:399ed10d1760
modify
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 11 Jun 2015 15:08:38 +0900 |
parents | 83ee9c75115a |
children | 0299b90256e5 |
files | src/llrb/llrb.c src/llrb/llrbContext.h |
diffstat | 2 files changed, 13 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/llrb/llrb.c Tue Jun 02 14:17:07 2015 +0900 +++ b/src/llrb/llrb.c Thu Jun 11 15:08:38 2015 +0900 @@ -44,13 +44,22 @@ } } -__code code1(struct Context* context) { - context->data[Allocate]->allocate.size = sizeof(long); - context->data[Allocate]->allocate.next = Code2; +__code code1(struct Context* context, struct Allocate *allocate) { + allocate->size = sizeof(long); + allocate->next = Code2; goto meta(context, Allocator); } +/* __code code1(struct Context* context) { */ +/* context->data[Allocate]->allocate.size = sizeof(long); */ +/* context->data[Allocate]->allocate.next = Code2; */ +/* goto meta(context, Allocator); */ +/* } */ + __code meta(struct Context* context, enum Code next) { + if (next == Code1) + goto code1(context, &context->data[Allocate]->allocate); + goto (context->code[next])(context); }