Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/papers/general/evaluation/cfa-stack.c

    r4c80a75 rac4dad2  
    88        };
    99
    10         void ?{}( stack(T) & s, stack(T) t ) {          // copy
     10        void ?{}( stack(T) & s ) { (s.head){ 0 }; }
     11
     12        void ?{}( stack(T) & s, stack(T) t ) {
    1113                node(T) ** cr = &s.head;
    1214                for ( node(T) * nx = t.head; nx; nx = nx->next ) {
     
    1820        }
    1921
    20         void clear( stack(T) & s ) with( s ) {
     22        void ^?{}( stack(T) & s) { clear( s ); }
     23
     24    void clear( stack(T) & s ) with( s ) {
    2125                for ( node(T) * nx = head; nx; ) {
    2226                        node(T) * cr = nx;
    2327                        nx = cr->next;
    2428                        ^(*cr){};
    25                         free( cr );
     29                        free(cr);
    2630                }
    2731                head = 0;
    2832        }
    29 
    30         void ?{}( stack(T) & s ) { (s.head){ 0 }; }
    31         void ^?{}( stack(T) & s) { clear( s ); }
    3233
    3334        stack(T) ?=?( stack(T) & s, stack(T) t ) {
     
    3839        }
    3940
    40         _Bool empty( const stack(T) & s ) {
    41                 return s.head == 0;
    42         }
     41        _Bool empty( const stack(T) & s ) { return s.head == 0; }
    4342
    4443        void push( stack(T) & s, T value ) with( s ) {
Note: See TracChangeset for help on using the changeset viewer.