[json-glib] node: Turn a g_debug() call into a JSON_NOTE



commit ae32d238ee2479002d07d7b5b19a482dc31e7ffd
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Mar 22 16:01:46 2016 +0000

    node: Turn a g_debug() call into a JSON_NOTE
    
    This allows conditional compilation, and it makes the debugging code
    consistent.

 json-glib/json-node.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/json-glib/json-node.c b/json-glib/json-node.c
index aa8e94e..1b7f0c0 100644
--- a/json-glib/json-node.c
+++ b/json-glib/json-node.c
@@ -29,6 +29,7 @@
 
 #include "json-types.h"
 #include "json-types-private.h"
+#include "json-debug.h"
 
 /**
  * SECTION:json-node
@@ -417,8 +418,14 @@ json_node_copy (JsonNode *node)
   copy->type = node->type;
   copy->immutable = node->immutable;
 
+#ifdef JSON_ENABLE_DEBUG
   if (node->immutable)
-    g_debug ("Copying immutable JsonNode %p", node);
+    {
+      JSON_NOTE (NODE, "Copying immutable JsonNode %p of type %s",
+                 node,
+                 json_node_type_name (node));
+    }
+#endif
 
   switch (copy->type)
     {


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