allow NULLs for output params
so you can now do im_minpos (im, &min, NULL, NULL);
This commit is contained in:
parent
9c6f08f22f
commit
fbc3b1f608
15
TODO
15
TODO
@ -1,18 +1,3 @@
|
||||
- strange
|
||||
|
||||
$ vips avg babe.jpg
|
||||
222.370525
|
||||
$ vips im_avg babe.jpg
|
||||
222.371
|
||||
** leak test on exit:
|
||||
3 objects alive:
|
||||
0) VipsAvg (0x1840df0)
|
||||
1) VipsImage (0x1844740)
|
||||
2) VipsImage (0x17b2d90)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- get rid of useless DMALLOC stuff
|
||||
|
||||
|
@ -446,18 +446,23 @@ vips_operation_get_valist_optional( VipsOperation *operation, va_list ap )
|
||||
g_param_spec_get_name( pspec ), arg );
|
||||
#endif /*VIPS_DEBUG */
|
||||
|
||||
g_object_get( G_OBJECT( operation ),
|
||||
g_param_spec_get_name( pspec ), arg, NULL );
|
||||
|
||||
/* If the pspec is an object, that will up the ref
|
||||
* count. We want to hand over the ref, so we have to
|
||||
* knock it down again.
|
||||
/* If the dest pointer is NULL, skip the read.
|
||||
*/
|
||||
if( G_IS_PARAM_SPEC_OBJECT( pspec ) ) {
|
||||
GObject *object;
|
||||
if( arg ) {
|
||||
g_object_get( G_OBJECT( operation ),
|
||||
g_param_spec_get_name( pspec ), arg,
|
||||
NULL );
|
||||
|
||||
object = *((GObject **) arg);
|
||||
g_object_unref( object );
|
||||
/* If the pspec is an object, that will up
|
||||
* the ref count. We want to hand over the
|
||||
* ref, so we have to knock it down again.
|
||||
*/
|
||||
if( G_IS_PARAM_SPEC_OBJECT( pspec ) ) {
|
||||
GObject *object;
|
||||
|
||||
object = *((GObject **) arg);
|
||||
g_object_unref( object );
|
||||
}
|
||||
}
|
||||
|
||||
VIPS_OPERATION_COLLECT_END
|
||||
|
Loading…
Reference in New Issue
Block a user