From ff5dd56e4f864d0c015dcd66fa852f9cf7cf90dd Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 25 Sep 2010 11:49:19 +0100 Subject: debug: Add debug notes in the GObject code --- json-glib/json-gobject.c | 14 ++++++++++++-- 1 file changed, 12 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 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); } -- cgit v1.2.1