summaryrefslogtreecommitdiff
path: root/json-glib/json-path.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2013-05-16 10:16:02 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2013-05-16 10:16:02 +0100
commit72a3a8f71003d40087c59371d07df5b59f2df3a7 (patch)
tree07f10a6c74d6f5c5ded5b36ddcd15fa0adf38be5 /json-glib/json-path.c
parent5b89c6438b8c1bf7a7b1476305a4e20f2c34234b (diff)
downloadjson-glib-72a3a8f71003d40087c59371d07df5b59f2df3a7.tar.gz
debug: Clean up debug flags accessor
Mark json_get_debug_flags() as an internal function, and drop the '_' prefix; also, add a simple macro that we can use everywhere to mask the function call.
Diffstat (limited to 'json-glib/json-path.c')
-rw-r--r--json-glib/json-path.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/json-glib/json-path.c b/json-glib/json-path.c
index f0f9fc5..6f83c90 100644
--- a/json-glib/json-path.c
+++ b/json-glib/json-path.c
@@ -329,6 +329,10 @@ json_path_new (void)
return g_object_new (JSON_TYPE_PATH, NULL);
}
+#ifdef JSON_ENABLE_DEBUG
+/* used as the function for a g_list_foreach() on a list of PathNode; needs
+ * a GString as the payload to build the output string
+ */
static void
json_path_foreach_print (gpointer data,
gpointer user_data)
@@ -388,6 +392,7 @@ json_path_foreach_print (gpointer data,
g_string_append (buf, ">");
}
+#endif /* JSON_ENABLE_DEBUG */
/**
* json_path_compile:
@@ -692,7 +697,7 @@ json_path_compile (JsonPath *path,
nodes = g_list_reverse (nodes);
#ifdef JSON_ENABLE_DEBUG
- if (_json_get_debug_flags () & JSON_DEBUG_PATH)
+ if (JSON_HAS_DEBUG (PATH))
{
GString *buf = g_string_new (NULL);