Changes in libcfa/src/stdlib.cfa [c0363be:8f650f0]
- File:
-
- 1 edited
-
libcfa/src/stdlib.cfa (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/stdlib.cfa
rc0363be r8f650f0 10 10 // Created On : Thu Jan 28 17:10:29 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Apr 21 16:17:22 202413 // Update Count : 70012 // Last Modified On : Sun Mar 17 08:25:32 2024 13 // Update Count : 699 14 14 // 15 15 … … 31 31 // Cforall allocation/deallocation and constructor/destructor, array types 32 32 33 forall( T & | sized(T), Parms ... | { void ?{}( T &, Parms); } )34 T * anew( size_t dim, Parmsp ) {33 forall( T & | sized(T), TT... | { void ?{}( T &, TT ); } ) 34 T * anew( size_t dim, TT p ) { 35 35 T * arr = alloc( dim ); 36 36 for ( i; dim ) { … … 51 51 } // adelete 52 52 53 forall( T & | sized(T) | { void ^?{}( T & ); }, List ... | { void adelete( List); } )54 void adelete( T arr[], Listrest ) {53 forall( T & | sized(T) | { void ^?{}( T & ); }, TT... | { void adelete( TT ); } ) 54 void adelete( T arr[], TT 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.