[json-glib] gobject: Fix deserialization of construct-only properties



commit 9b6acd68e156a45cc845bdebd99c174e82d0677c
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Sat Sep 25 11:50:38 2010 +0100

    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 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))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]