Changeset 6a8ac0b for doc/generic_types/evaluation/cfa-stack.c
- Timestamp:
- Apr 25, 2017, 8:21:10 AM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 89a9be2
- Parents:
- b3d70eba
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/generic_types/evaluation/cfa-stack.c
rb3d70eba r6a8ac0b 11 11 forall(otype T) void ?{}(stack(T)* s, stack(T) t) { 12 12 stack_node(T)** crnt = &s->head; 13 stack_node(T)* next = t.head; 14 while ( next ) { 13 for ( stack_node(T)* next = t.head; next; next = next->next ) { 15 14 *crnt = ((stack_node(T)*)malloc()){ next->value }; /***/ 16 15 stack_node(T)* acrnt = *crnt; 17 16 crnt = &acrnt->next; 18 next = next->next;19 17 } 20 18 *crnt = 0; … … 46 44 47 45 forall(otype T) void clear(stack(T)* s) { 48 stack_node(T)* next = s->head; 49 while ( next ) { 46 for ( stack_node(T)* next = s->head; next; ) { 50 47 stack_node(T)* crnt = next; 51 48 next = crnt->next;
Note: See TracChangeset
for help on using the changeset viewer.