Ignore:
Timestamp:
Apr 14, 2017, 4:51:13 PM (5 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
1504536, e3de500
Parents:
3895b8b5
Message:

Update benchmarks, cleanup edits to the evaluation section

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/generic_types/evaluation/c-stack.c

    r3895b8b5 r3fb7f5e  
    88
    99struct stack new_stack() {
    10         return (struct stack){ NULL };
     10        return (struct stack){ NULL }; /***/
    1111}
    1212
     
    1515        struct stack_node* next = t->head;
    1616        while ( next ) {
    17                 *crnt = malloc(sizeof(struct stack_node));
    18                 **crnt = (struct stack_node){ copy(next->value) };
     17                *crnt = malloc(sizeof(struct stack_node)); /***/
     18                **crnt = (struct stack_node){ copy(next->value) }; /***/
    1919                crnt = &(*crnt)->next;
    2020                next = next->next;
     
    3939
    4040void push_stack(struct stack* s, void* value) {
    41         struct stack_node* n = malloc(sizeof(struct stack_node));
    42         *n = (struct stack_node){ value, s->head };
     41        struct stack_node* n = malloc(sizeof(struct stack_node)); /***/
     42        *n = (struct stack_node){ value, s->head }; /***/
    4343        s->head = n;
    4444}
Note: See TracChangeset for help on using the changeset viewer.