comparison src/parallel_execution/stack.c @ 144:d529c024e5a5

name fixes
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 10 Nov 2016 07:33:10 +0900
parents 4f6a660c14a1
children cc071cf1ba85
comparison
equal deleted inserted replaced
143:34a7a21edc36 144:d529c024e5a5
6 union Data* createSingleLinkedStack(struct Context* context) { 6 union Data* createSingleLinkedStack(struct Context* context) {
7 struct Stack* stack = &ALLOCATE(context, Stack)->stack; 7 struct Stack* stack = &ALLOCATE(context, Stack)->stack;
8 struct SingleLinkedStack* singleLinkedStack = &ALLOCATE(context, SingleLinkedStack)->singleLinkedStack; 8 struct SingleLinkedStack* singleLinkedStack = &ALLOCATE(context, SingleLinkedStack)->singleLinkedStack;
9 stack->stack = (union Data*)singleLinkedStack; 9 stack->stack = (union Data*)singleLinkedStack;
10 singleLinkedStack->top = NULL; 10 singleLinkedStack->top = NULL;
11 stack->push = PushSingleLinkedStack; 11 stack->push = C_pushSingleLinkedStack;
12 stack->pop = PopSingleLinkedStack; 12 stack->pop = C_popSingleLinkedStack;
13 stack->pop2 = Pop2SingleLinkedStack; 13 stack->pop2 = C_pop2SingleLinkedStack;
14 stack->get = GetSingleLinkedStack; 14 stack->get = C_getSingleLinkedStack;
15 stack->get2 = Get2SingleLinkedStack; 15 stack->get2 = C_get2SingleLinkedStack;
16 stack->isEmpty = IsEmptySingleLinkedStack; 16 stack->isEmpty = C_isEmptySingleLinkedStack;
17 return (union Data*)(stack); 17 return (union Data*)(stack);
18 } 18 }
19 19
20 void printStack1(union Data* data) { 20 void printStack1(union Data* data) {
21 struct Node* node = &data->element.data->node; 21 struct Node* node = &data->element.data->node;