Ignore:
Timestamp:
Sep 30, 2007, 11:55:49 PM (13 years ago)
Author:
charles
Message:

experimental better peer management.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/ptrarray.c

    r3221 r3242  
    4141
    4242void
    43 tr_ptrArrayFree( tr_ptrArray * t )
    44 {
     43tr_ptrArrayForeach( tr_ptrArray * t, PtrArrayForeachFunc func )
     44{
     45    int i;
     46
    4547    assert( t != NULL );
    4648    assert( t->items != NULL );
     49    assert( func != NULL );
     50
     51    for( i=0; i<t->n_items; ++i )
     52        func( t->items[i] );
     53}
     54
     55void
     56tr_ptrArrayFree( tr_ptrArray * t, PtrArrayForeachFunc func )
     57{
     58    assert( t != NULL );
     59    assert( t->items != NULL );
     60
     61    if( func != NULL )
     62        tr_ptrArrayForeach( t, func );
    4763
    4864    tr_free( t->items );
Note: See TracChangeset for help on using the changeset viewer.