From 9b6acd68e156a45cc845bdebd99c174e82d0677c Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 25 Sep 2010 11:50:38 +0100 Subject: 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. --- json-glib/json-gobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'json-glib/json-gobject.c') 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)) -- cgit v1.2.1