GObject: fix property override type checks
authorRyan Lortie <desrt@desrt.ca>
Tue, 20 Dec 2011 23:26:14 +0000 (18:26 -0500)
committerRyan Lortie <desrt@desrt.ca>
Wed, 21 Dec 2011 00:18:25 +0000 (19:18 -0500)
commit5fb7a8e127bde6465a5b9e22b299ca2e439e702c
tree2de035e8f32cbaf59637c1bb940e0dab3c0b38c1
parentab0da3c2821b6e9ed89a3a2a708bbae1db2ed45f
GObject: fix property override type checks

The property override typecheck was meant to enforce the type on the
overriding property being exactly equal to the type on the interface
property.  Instead, g_type_is_a() was incorrectly used.

We could try to enforce equality, but if a property is read-only then it
should be possible for the implementation to type the property with any
subtype of the type specified on the interface (because returning a more
specific type will still satisfy the interface).  Likewise, if the
property is write-only then it should be possible for the implementation
to type the property with any supertype.

We implement the check this way.

https://bugzilla.gnome.org/show_bug.cgi?id=666616
gobject/gobject.c