Mercurial > hg > Papers > 2019 > oshiro-thesis
annotate final_pre/src/SingleLinkedStack.cbc.replace @ 11:ef87093f92d4
add pdf
author | e155702 |
---|---|
date | Sun, 17 Feb 2019 17:13:37 +0900 |
parents | 0e8b9646d43f |
children |
rev | line source |
---|---|
7 | 1 __code pushSingleLinkedStack(struct Single LinkedStack* stack,union Data* data, __code next(...)) { |
2 Element* element = new Element(); | |
3 element->next = stack->top; | |
4 element->data = data; | |
5 stack->top = element; | |
6 goto next(...); | |
7 } | |
8 __code popSingleLinkedStack(struct Single LinkedStack* stack, __code next(union Data* data, ...)) { | |
9 if (stack->top) { | |
10 data = stack->top->data; | |
11 stack->top = stack->top->next; | |
12 } else { | |
13 data = NULL; | |
14 } | |
15 goto next(data, ...); | |
16 } |