Changeset 18f0b70 for libcfa/src/stdlib.hfa
- Timestamp:
- Nov 10, 2020, 12:21:21 AM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 0dd9a5e
- Parents:
- 16ba4a6 (diff), 75baaa3 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/stdlib.hfa
r16ba4a6 r18f0b70 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.