Ignore:
Timestamp:
Nov 2, 2020, 11:35:41 AM (13 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
e873838
Parents:
51e7583 (diff), ea3fa25 (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.cfa

    r51e7583 rf7136f7  
    5858
    5959forall( dtype T | sized(T) | { void ^?{}( T & ); } )
    60 void adelete( size_t dim, T arr[] ) {
     60void adelete( T arr[] ) {
    6161        if ( arr ) {                                                                            // ignore null
     62                size_t dim = malloc_size( arr ) / sizeof( T );
    6263                for ( int i = dim - 1; i >= 0; i -= 1 ) {               // reverse allocation order, must be unsigned
    6364                        ^(arr[i]){};                                                            // run destructor
     
    6869
    6970forall( dtype T | sized(T) | { void ^?{}( T & ); }, ttype Params | { void adelete( Params ); } )
    70 void adelete( size_t dim, T arr[], Params rest ) {
     71void adelete( T arr[], Params rest ) {
    7172        if ( arr ) {                                                                            // ignore null
     73                size_t dim = malloc_size( arr ) / sizeof( T );
    7274                for ( int i = dim - 1; i >= 0; i -= 1 ) {               // reverse allocation order, must be unsigned
    7375                        ^(arr[i]){};                                                            // run destructor
Note: See TracChangeset for help on using the changeset viewer.