return default value for unset props
we used to issue a warning and return early, but this can leave garbage in the *value pointer, I think ruby gobject-introspection will walk object props during GC and can see state inbetween init and build when not all objects have been given a value ... we don't want these warnings
This commit is contained in:
parent
faf7b70e2e
commit
64d081e726
@ -1,5 +1,6 @@
|
|||||||
7/10/15 started 8.2.0
|
7/10/15 started 8.2.0
|
||||||
- added im_bufmagick2vips(), a vips7 wrapper for magick load from buffer
|
- added im_bufmagick2vips(), a vips7 wrapper for magick load from buffer
|
||||||
|
- fetch unset property now returns default value rather than warning
|
||||||
|
|
||||||
7/5/15 started 8.1.1
|
7/5/15 started 8.1.1
|
||||||
- oop, vips-8.0 should be vips-8.1, thanks Danilo
|
- oop, vips-8.0 should be vips-8.1, thanks Danilo
|
||||||
|
@ -9,11 +9,7 @@
|
|||||||
<bookinfo>
|
<bookinfo>
|
||||||
<title>VIPS Reference Manual</title>
|
<title>VIPS Reference Manual</title>
|
||||||
<releaseinfo>
|
<releaseinfo>
|
||||||
<<<<<<< HEAD
|
|
||||||
For VIPS 8.2.0.
|
For VIPS 8.2.0.
|
||||||
=======
|
|
||||||
For VIPS 8.1.1.
|
|
||||||
>>>>>>> 8.1
|
|
||||||
The latest version of this documentation can be found on the
|
The latest version of this documentation can be found on the
|
||||||
<ulink role="online-location"
|
<ulink role="online-location"
|
||||||
url="http://www.vips.ecs.soton.ac.uk/index.php?title=Documentation">VIPS website</ulink>.
|
url="http://www.vips.ecs.soton.ac.uk/index.php?title=Documentation">VIPS website</ulink>.
|
||||||
|
@ -1315,11 +1315,12 @@ vips_object_get_property( GObject *gobject,
|
|||||||
g_assert( ((VipsArgument *) argument_class)->pspec == pspec );
|
g_assert( ((VipsArgument *) argument_class)->pspec == pspec );
|
||||||
|
|
||||||
if( !argument_instance->assigned ) {
|
if( !argument_instance->assigned ) {
|
||||||
g_warning( "%s: %s.%s attempt to read unset %s property",
|
/* Set the value to the default. Things like Ruby
|
||||||
G_STRLOC,
|
* gobject-introspection will walk objects during GC, and we
|
||||||
G_OBJECT_TYPE_NAME( gobject ),
|
* can find ourselves fetching object vaklues between init and
|
||||||
g_param_spec_get_name( pspec ),
|
* build.
|
||||||
g_type_name( G_PARAM_SPEC_VALUE_TYPE( pspec ) ) );
|
*/
|
||||||
|
g_param_value_set_default( pspec, value );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user