[json-glib] debug: Add debug notes in the GObject code
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib] debug: Add debug notes in the GObject code
- Date: Sat, 25 Sep 2010 11:00:00 +0000 (UTC)
commit ff5dd56e4f864d0c015dcd66fa852f9cf7cf90dd
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Sat Sep 25 11:49:19 2010 +0100
debug: Add debug notes in the GObject code
json-glib/json-gobject.c | 14 ++++++++++++--
json-glib/json-serializable.c | 3 +++
2 files changed, 15 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);
}
diff --git a/json-glib/json-serializable.c b/json-glib/json-serializable.c
index 43ada37..1263eec 100644
--- a/json-glib/json-serializable.c
+++ b/json-glib/json-serializable.c
@@ -36,6 +36,7 @@
#include "json-types-private.h"
#include "json-gobject-private.h"
+#include "json-debug.h"
/**
* json_serializable_serialize_property:
@@ -111,6 +112,7 @@ json_serializable_real_deserialize (JsonSerializable *serializable,
GParamSpec *pspec,
JsonNode *node)
{
+ JSON_NOTE (GOBJECT, "Default deserialization for property '%s'", pspec->name);
return json_deserialize_pspec (value, pspec, node);
}
@@ -120,6 +122,7 @@ json_serializable_real_serialize (JsonSerializable *serializable,
const GValue *value,
GParamSpec *pspec)
{
+ JSON_NOTE (GOBJECT, "Default serialization for property '%s'", pspec->name);
return json_serialize_pspec (value, pspec);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]