Mercurial > hg > Papers > 2018 > nozomi-master
view paper/src/singleLinkedStack.c @ 116:ed6719c301fc
Update slide
author | atton <atton@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 13 Feb 2017 17:31:45 +0900 |
parents | c0693ad89f04 |
children |
line wrap: on
line source
__code pushSingleLinkedStack(struct SingleLinkedStack* stack,union Data* data, __code next(...)) { Element* element = new Element(); element->next = stack->top; element->data = data; stack->top = element; goto next(...); } __code popSingleLinkedStack(struct SingleLinkedStack* stack, __code next(union Data* data, ...)) { if (stack->top) { data = stack->top->data; stack->top = stack->top->next; } else { data = NULL; } goto next(data, ...); }