mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-24 09:58:54 +02:00
GObject: do checks on interface property install
Add some checks to g_object_interface_install_property() similar to those in g_object_class_install_property(). https://bugzilla.gnome.org/show_bug.cgi?id=666616
This commit is contained in:
@@ -706,7 +706,13 @@ g_object_interface_install_property (gpointer g_iface,
|
||||
g_return_if_fail (G_IS_PARAM_SPEC (pspec));
|
||||
g_return_if_fail (!G_IS_PARAM_SPEC_OVERRIDE (pspec)); /* paranoid */
|
||||
g_return_if_fail (PARAM_SPEC_PARAM_ID (pspec) == 0); /* paranoid */
|
||||
|
||||
|
||||
g_return_if_fail (pspec->flags & (G_PARAM_READABLE | G_PARAM_WRITABLE));
|
||||
if (pspec->flags & G_PARAM_CONSTRUCT)
|
||||
g_return_if_fail ((pspec->flags & G_PARAM_CONSTRUCT_ONLY) == 0);
|
||||
if (pspec->flags & (G_PARAM_CONSTRUCT | G_PARAM_CONSTRUCT_ONLY))
|
||||
g_return_if_fail (pspec->flags & G_PARAM_WRITABLE);
|
||||
|
||||
install_property_internal (iface_class->g_type, 0, pspec);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user