summaryrefslogtreecommitdiff
path: root/json-glib/json-gobject.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@linux.intel.com>2010-09-25 11:49:19 +0100
committerEmmanuele Bassi <ebassi@linux.intel.com>2010-09-25 11:52:07 +0100
commitff5dd56e4f864d0c015dcd66fa852f9cf7cf90dd (patch)
treed783dfde4c03d54548fbb1d2a9a3a174af536685 /json-glib/json-gobject.c
parent7707b18f42b3a19dd780ba73ce1dabb6b8ef3c95 (diff)
downloadjson-glib-ff5dd56e4f864d0c015dcd66fa852f9cf7cf90dd.tar.gz
debug: Add debug notes in the GObject code
Diffstat (limited to 'json-glib/json-gobject.c')
-rw-r--r--json-glib/json-gobject.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/json-glib/json-gobject.c b/json-glib/json-gobject.c
index ba04e19..5daf93e 100644
--- a/json-glib/json-gobject.c
+++ b/json-glib/json-gobject.c
@@ -42,6 +42,7 @@
#include "json-types-private.h"
#include "json-gobject-private.h"
+#include "json-debug.h"
#include "json-parser.h"
#include "json-generator.h"
@@ -300,6 +301,7 @@ json_gobject_new (GType gtype,
if (deserialize_property)
{
+ JSON_NOTE (GOBJECT, "Using JsonSerializable for property '%s'", pspec->name);
res = iface->deserialize_property (serializable, pspec->name,
&value,
pspec,
@@ -307,13 +309,21 @@ json_gobject_new (GType gtype,
}
if (!res)
- res = json_deserialize_pspec (&value, pspec, val);
+ {
+ JSON_NOTE (GOBJECT, "Using json_deserialize_pspec for property '%s'", pspec->name);
+ res = json_deserialize_pspec (&value, pspec, val);
+ }
/* FIXME - we probably want to be able to have a custom
* set_property() for Serializable implementations
*/
if (res)
- g_object_set_property (retval, pspec->name, &value);
+ {
+ JSON_NOTE (GOBJECT, "Calling set_property('%s', '%s')",
+ pspec->name,
+ g_type_name (G_VALUE_TYPE (&value)));
+ g_object_set_property (retval, pspec->name, &value);
+ }
g_value_unset (&value);
}