Changes in libcfa/src/stdlib.cfa [8f650f0:c0363be]
- File:
-
- 1 edited
-
libcfa/src/stdlib.cfa (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/stdlib.cfa
r8f650f0 rc0363be 10 10 // Created On : Thu Jan 28 17:10:29 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Mar 17 08:25:32 202413 // Update Count : 69912 // Last Modified On : Sun Apr 21 16:17:22 2024 13 // Update Count : 700 14 14 // 15 15 … … 31 31 // Cforall allocation/deallocation and constructor/destructor, array types 32 32 33 forall( T & | sized(T), TT... | { void ?{}( T &, TT); } )34 T * anew( size_t dim, TTp ) {33 forall( T & | sized(T), Parms ... | { void ?{}( T &, Parms ); } ) 34 T * anew( size_t dim, Parms p ) { 35 35 T * arr = alloc( dim ); 36 36 for ( i; dim ) { … … 51 51 } // adelete 52 52 53 forall( T & | sized(T) | { void ^?{}( T & ); }, TT... | { void adelete( TT); } )54 void adelete( T arr[], TTrest ) {53 forall( T & | sized(T) | { void ^?{}( T & ); }, List ... | { void adelete( List ); } ) 54 void adelete( T arr[], List rest ) { 55 55 if ( arr ) { // ignore null 56 56 size_t dim = malloc_size( arr ) / sizeof( T );
Note:
See TracChangeset
for help on using the changeset viewer.