diff options
author | Emmanuele Bassi <ebassi@linux.intel.com> | 2010-09-25 11:50:38 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@linux.intel.com> | 2010-09-25 11:52:07 +0100 |
commit | 9b6acd68e156a45cc845bdebd99c174e82d0677c (patch) | |
tree | 3c1252ce2768f07eadd84c3530b1fbbbe7246766 /json-glib/json-gobject.c | |
parent | d480f2e77e3dc0d00fc617686b306f96353b7177 (diff) | |
download | json-glib-9b6acd68e156a45cc845bdebd99c174e82d0677c.tar.gz |
gobject: Fix deserialization of construct-only properties
Commit 2d7550948dfb2e5907b851bc2c4bd296a7526086 broke the construct-only
properties; we now only check for the G_PARAM_CONSTRUCT_ONLY flag, and
pass construct-only properties to g_object_newv(); all the properties
flagged as G_PARAM_CONSTRUCT gets passed with the rest of the properties
after that.
Diffstat (limited to 'json-glib/json-gobject.c')
-rw-r--r-- | json-glib/json-gobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/json-glib/json-gobject.c b/json-glib/json-gobject.c index 5daf93e..5742188 100644 --- a/json-glib/json-gobject.c +++ b/json-glib/json-gobject.c @@ -216,8 +216,8 @@ json_gobject_new (GType gtype, if (!pspec) goto next_member; - if (!(pspec->flags & G_PARAM_CONSTRUCT_ONLY) || - !(pspec->flags & G_PARAM_CONSTRUCT)) + /* we only apply construct-only properties here */ + if ((pspec->flags & G_PARAM_CONSTRUCT_ONLY) == 0) goto next_member; if (!(pspec->flags & G_PARAM_WRITABLE)) |