summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tree.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/tree.c b/src/tree.c
index 9d35291..490ccaf 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -50,12 +50,11 @@ print_tree_recurse(MqTree *node, gsize indent)
}
static void
-print_tree(MqTree *node)
+print_tree(const gchar *msg, MqTree *node)
{
+ g_print("%s 0x%" PRIxPTR ", ", msg, (uintptr_t) node);
node = node->root;
-
- g_print("New tree (size %d):\n", node->size);
-
+ g_print("new tree (size %d):\n", node->size);
print_tree_recurse(node, 0);
}
@@ -145,7 +144,7 @@ mq_tree_insert_child_allocated(MqTree *node, MqTree *parent, gpointer data)
node->data = data;
- print_tree(node);
+ print_tree("Inserted child", node);
return node;
}
@@ -175,7 +174,7 @@ mq_tree_insert_sibling_allocated(MqTree *node, MqTree *sibling, gpointer data)
node->data = data;
- print_tree(node);
+ print_tree("Inserted sibling", node);
return node;
}