comparison src/ex_stack.cbc @ 1:73127e0ab57c

(none)
author soto@cr.ie.u-ryukyu.ac.jp
date Tue, 08 Sep 2020 18:38:08 +0900
parents
children
comparison
equal deleted inserted replaced
0:b919985837a3 1:73127e0ab57c
1 __code clearSingleLinkedStack(struct SingleLinkedStack* stack,__code next(...)) {
2 stack->top = NULL;
3 goto next(...);
4 }
5
6 __code pushSingleLinkedStack(struct SingleLinkedStack* stack,union Data* data, __code next(...)) {
7 Element* element = new Element();
8 element->next = stack->top;
9 element->data = data;
10 stack->top = element;
11 goto next(...);
12 }