This commit is contained in:
John Cupitt 2007-10-22 14:09:41 +00:00
parent 59187ed20f
commit 992921b012
3 changed files with 8 additions and 18 deletions

6
TODO
View File

@ -1,11 +1,5 @@
- test maxpos_avg, quite a few changes
- test maxpos_vec, quite a few changes
also, same problem as maxpos_avg re. uninit data?
- im_spcor2() has a potential leak in the start function
Python binding
==============

View File

@ -410,20 +410,19 @@ static void *
spcor2_start( IMAGE *r, void *a, void *b ){
IMAGE *f= (IMAGE *) a;
REGION *reg= im_region_create( f );
spcor2_seq *seq;
if( ! reg )
return NULL;
seq= IM_NEW( NULL, spcor2_seq );
seq= IM_NEW( r, spcor2_seq );
if( ! seq )
return NULL;
seq-> f= reg;
seq-> f= im_region_create( f );
seq-> f_cols= NULL;
seq-> max_cols= 0;
if( ! seq-> f )
return NULL;
return seq;
}
@ -528,9 +527,8 @@ spcor2_stop( void *vseq, void *a, void *b ){
spcor2_seq *seq= (spcor2_seq *) vseq;
im_region_free( seq-> f );
im_free( seq-> f_cols );
im_free( seq );
IM_FREEF( im_region_free, seq-> f );
IM_FREE( seq-> f_cols );
return 0;
}

View File

@ -886,11 +886,9 @@ print_args( im_function *fn, im_object *vargv )
/* Print all elements.
*/
for( i = 0; i < vargc; i++ )
if( fn->argv[i].print && vargv[i] ) {
printf( "%s: ", fn->argv[i].name );
if( fn->argv[i].print && vargv[i] )
if( fn->argv[i].print( vargv[i] ) )
return( -1 );
}
return( 0 );
}