summaryrefslogtreecommitdiff
path: root/json-glib/json-node.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2016-03-22 16:01:46 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2016-03-22 16:06:13 +0000
commitae32d238ee2479002d07d7b5b19a482dc31e7ffd (patch)
tree2ff9a5248baa8f0fbba3898d727774a4560857c4 /json-glib/json-node.c
parentb659345f0fbf08053ae7087c7c2eb25905e61cf3 (diff)
downloadjson-glib-ae32d238ee2479002d07d7b5b19a482dc31e7ffd.tar.gz
node: Turn a g_debug() call into a JSON_NOTE
This allows conditional compilation, and it makes the debugging code consistent.
Diffstat (limited to 'json-glib/json-node.c')
-rw-r--r--json-glib/json-node.c9
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)
{