Mercurial > hg > Members > Moririn
changeset 61:e18baa87cf49
merge
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 16 Jun 2015 17:13:16 +0900 |
parents | 4e5b425922ce (diff) e8bf3ee224e7 (current diff) |
children | fb2e67dfa5ef |
files | |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/llrb/llrb.c Tue Jun 16 16:00:38 2015 +0900 +++ b/src/llrb/llrb.c Tue Jun 16 17:13:16 2015 +0900 @@ -98,8 +98,8 @@ if (tree->root == 0) { context->next[context->current++] = Insert; } else { + context->next[context->current++] = Replace; context->next[context->current++] = Compare; - context->next[context->current++] = Replace; tree->current = tree->root; } goto meta(context, Allocator); @@ -129,8 +129,8 @@ stack_pop(pstack, &tree->current); context->next[context->current++] = Insert; } else { + context->next[context->current++] = Replace; context->next[context->current++] = Compare; - context->next[context->current++] = Replace; } goto meta(context, Allocator); @@ -298,14 +298,12 @@ puts("---before---"); print_tree(context->data[Tree]->tree.root, 0); - struct Allocate* allocate = &context->data[Allocate]->allocate; - allocate->size = sizeof(struct Node); - allocate->next = Code5; - struct Node* node = &context->data[Node]->node; node->key = 0; node->value = 0; + context->next[context->current++] = Code5; + goto meta(context, Put); }