Ignore:
Timestamp:
Apr 11, 2017, 5:11:55 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:
4f57930
Parents:
e6dceef
Message:

Update benchmarks to include stack of pairs

File:
1 edited

Legend:

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

    re6dceef r87c5f40  
    1111}
    1212
    13 void copy_stack(struct stack* s, struct stack* t, void* (*copy)(void*)) {
     13void copy_stack(struct stack* s, const struct stack* t, void* (*copy)(const void*)) {
    1414        struct stack_node** crnt = &s->head;
    1515        struct stack_node* next = t->head;
     
    2323}
    2424
    25 void clear_stack(struct stack* s) {
     25void clear_stack(struct stack* s, void (*free_el)(void*)) {
    2626        struct stack_node* next = s->head;
    2727        while ( next ) {
    2828                struct stack_node* crnt = next;
    2929                next = crnt->next;
    30                 free(crnt->value);
     30                free_el(crnt->value);
    3131                free(crnt);
    3232        }
Note: See TracChangeset for help on using the changeset viewer.