Changeset b82d140 for libcfa


Ignore:
Timestamp:
Nov 10, 2020, 12:44:44 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
080b0a1, 883c4d9, f33eab7
Parents:
82a2fed (diff), cdacb73 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/stdlib.hfa

    r82a2fed rb82d140  
    101101                return (T *)pvalloc( sizeof(T) );                               // C pvalloc
    102102        } // pvalloc
     103
     104        void free( T * addr ) {
     105                free( (void *) addr );                                                  // C free
     106        } // free
     107} // distribution
     108
     109static inline forall( ttype TT | { void free( TT ); } ) {
     110        // T* does not take void* and vice-versa
     111
     112        void free( void * addr, TT rest ) {
     113                free( addr );
     114                free( rest );
     115        } // free
     116
     117        forall( dtype T | sized(T) )
     118        void free( T * addr, TT rest ) {
     119                free( addr );
     120                free( rest );
     121        } // free
    103122} // distribution
    104123
Note: See TracChangeset for help on using the changeset viewer.