diff --git a/ChangeLog b/ChangeLog index b55ced7b..8207551d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -35,6 +35,7 @@ - added nohalo interpolator - updated format docs - IM_INPUT_INTERPOLATE() now used by affinei and affinei_all +- added vips_object_new 11/9/08 started 7.16.3 - oop typo in manpage for im_project() diff --git a/TODO b/TODO index cfc96742..f85ebdbf 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,4 @@ -- interpolate.c never calls vips_object_build() for bilinear etc., is this OK? - - try to add this - need to write interpolate docs ... manpages and tutorial diff --git a/libsrc/iofuncs/object.c b/libsrc/iofuncs/object.c index e307dd29..48db8c49 100644 --- a/libsrc/iofuncs/object.c +++ b/libsrc/iofuncs/object.c @@ -964,8 +964,12 @@ vips_object_new( GType type, VipsObjectSetArguments set, void *a, void *b ) object = VIPS_OBJECT( g_object_new( type, NULL ) ); - if( set( object, a, b ) || - vips_object_build( object ) ) { + if( set && set( object, a, b ) ) { + g_object_unref( object ); + return( NULL ); + } + + if( vips_object_build( object ) ) { g_object_unref( object ); return( NULL ); } diff --git a/libsrc/mosaicing/interpolate.c b/libsrc/mosaicing/interpolate.c index 695416d4..e9379dd2 100644 --- a/libsrc/mosaicing/interpolate.c +++ b/libsrc/mosaicing/interpolate.c @@ -208,8 +208,9 @@ vips_interpolate_nearest_init( VipsInterpolateNearest *nearest ) VipsInterpolate * vips_interpolate_nearest_new( void ) { - return( VIPS_INTERPOLATE( g_object_new( - VIPS_TYPE_INTERPOLATE_NEAREST, NULL ) ) ); + + return( VIPS_INTERPOLATE( vips_object_new( + VIPS_TYPE_INTERPOLATE_NEAREST, NULL, NULL, NULL ) ) ); } /* Convenience: return a static nearest you don't need to free. @@ -422,8 +423,8 @@ vips_interpolate_bilinear_init( VipsInterpolateBilinear *bilinear ) VipsInterpolate * vips_interpolate_bilinear_new( void ) { - return( VIPS_INTERPOLATE( g_object_new( - VIPS_TYPE_INTERPOLATE_BILINEAR, NULL ) ) ); + return( VIPS_INTERPOLATE( vips_object_new( + VIPS_TYPE_INTERPOLATE_BILINEAR, NULL, NULL, NULL ) ) ); } /* Convenience: return a static bilinear you don't need to free. @@ -467,5 +468,5 @@ vips_interpolate_new( const char *nickname ) if( !(type = vips_type_find( "VipsInterpolate", nickname )) ) return( NULL ); - return( VIPS_INTERPOLATE( g_object_new( type, NULL ) ) ); + return( VIPS_INTERPOLATE( vips_object_new( type, NULL, NULL, NULL ) ) ); }