mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 06:33:41 +02:00
new function g_log_set_always_fatal() to set an additional fatal_mask for
Tue Aug 18 04:40:17 1998 Tim Janik <timj@gtk.org> * glib.h: * gmessages.c: new function g_log_set_always_fatal() to set an additional fatal_mask for log levels that are considered to be fatal globally (required by gtk). since this mask is not domain-associated, it is restricted to the log levels, introduced by glib itself. * gmem.c: * grel.c: * gtree.c (g_tree_node_check): don't use g_print() calls for informational/debugging output, but log all this stuff through g_log() with G_LOG_LEVEL_INFO. libraries shouldn't use printf(), g_print() or g_printerr() at all.
This commit is contained in:
13
glib/gtree.c
13
glib/gtree.c
@@ -699,22 +699,23 @@ g_tree_node_check (GTreeNode *node)
|
||||
gint left_height;
|
||||
gint right_height;
|
||||
gint balance;
|
||||
|
||||
|
||||
if (node)
|
||||
{
|
||||
left_height = 0;
|
||||
right_height = 0;
|
||||
|
||||
|
||||
if (node->left)
|
||||
left_height = g_tree_node_height (node->left);
|
||||
if (node->right)
|
||||
right_height = g_tree_node_height (node->right);
|
||||
|
||||
|
||||
balance = right_height - left_height;
|
||||
if (balance != node->balance)
|
||||
g_print ("g_tree_node_check: failed: %d ( %d )\n",
|
||||
balance, node->balance);
|
||||
|
||||
g_log (g_log_domain_glib, G_LOG_LEVEL_INFO,
|
||||
"g_tree_node_check: failed: %d ( %d )\n",
|
||||
balance, node->balance);
|
||||
|
||||
if (node->left)
|
||||
g_tree_node_check (node->left);
|
||||
if (node->right)
|
||||
|
Reference in New Issue
Block a user