From ae32d238ee2479002d07d7b5b19a482dc31e7ffd Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 22 Mar 2016 16:01:46 +0000 Subject: 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 file changed, 8 insertions(+), 1 deletion(-) (limited to 'json-glib/json-node.c') 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) { -- cgit v1.2.1