Changeset 55acc3a for libcfa/src/stdlib.hfa
- Timestamp:
- Nov 6, 2020, 4:48:34 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 139775e
- Parents:
- ea3fa25
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/stdlib.hfa
rea3fa25 r55acc3a 101 101 return (T *)pvalloc( sizeof(T) ); // C pvalloc 102 102 } // pvalloc 103 104 void free( T * addr ) { 105 free( (void *) addr ); // C free 106 } // free 107 } // distribution 108 109 static 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 103 122 } // distribution 104 123
Note: See TracChangeset
for help on using the changeset viewer.