summaryrefslogtreecommitdiff
path: root/gobject/gobject.c
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2011-12-20 19:33:02 -0500
committerRyan Lortie <desrt@desrt.ca>2011-12-20 19:40:44 -0500
commit4e793c2eefab1a9b5b0c29b530cbe77fb53d7396 (patch)
treed480f485bb696a7425baa3e956fc8de0677fef5e /gobject/gobject.c
parentb3b9f82206707d6adad0d54ae9232bc826bec574 (diff)
downloadglib-4e793c2eefab1a9b5b0c29b530cbe77fb53d7396.tar.gz
GObject: allow G_PARAM_CONSTRUCT on any override
We were previously preventing implementations of an interface from specifying G_PARAM_CONSTRUCT for a property of that interface if the interface didn't specify it itself (or was readonly). This is something that should only interest the implementation, so we remove this restriction. This allows 6 new possible override scenarios: - writable -> writable/construct - writable -> readwrite/construct - readwrite -> readwrite/construct - writable/construct-only -> writable/construct - writable/construct-only -> readwrite/construct - readwrite/construct-only -> readwrite/construct and we update the testcase to reflect this. https://bugzilla.gnome.org/show_bug.cgi?id=666616
Diffstat (limited to 'gobject/gobject.c')
-rw-r--r--gobject/gobject.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gobject/gobject.c b/gobject/gobject.c
index ffbc3bbc5..b0fe21837 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -1407,13 +1407,10 @@ object_interface_check_properties (gpointer func_data,
* If the interface was not writable to begin with then we don't
* really have any problems here because "writable at construct
* type only" is still more permissive than "read only".
- *
- * It's questionable if we should have G_PARAM_CONSTRUCT checked
- * here....
*/
if (pspecs[n]->flags & G_PARAM_WRITABLE)
{
- if (!SUBSET (class_pspec->flags, pspecs[n]->flags, G_PARAM_CONSTRUCT | G_PARAM_CONSTRUCT_ONLY))
+ if (!SUBSET (class_pspec->flags, pspecs[n]->flags, G_PARAM_CONSTRUCT_ONLY))
{
g_critical ("Flags for property '%s' on class '%s' introduce additional restrictions on "
"writability compared with the property on interface '%s'\n", pspecs[n]->name,