mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
removed assertment about rtree->root being NULL, so this function can be
Sun Jan 17 17:15:59 1999 Tim Janik <timj@gtk.org> * gtree.c (g_tree_traverse): removed assertment about rtree->root being NULL, so this function can be applied to unpopulated trees as well, fix provided by Simon Kagedal <sika8225@csd.uu.se>.
This commit is contained in:
parent
48763aea23
commit
6db5c264f9
@ -1,3 +1,9 @@
|
||||
Sun Jan 17 17:15:59 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtree.c (g_tree_traverse): removed assertment about rtree->root being
|
||||
NULL, so this function can be applied to unpopulated trees as well, fix
|
||||
provided by Simon Kagedal <sika8225@csd.uu.se>.
|
||||
|
||||
Sun Jan 17 11:17:19 1999 Christopher Blizzard <blizzard@appliedtheory.com>
|
||||
|
||||
* glib.spec: add packager address
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sun Jan 17 17:15:59 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtree.c (g_tree_traverse): removed assertment about rtree->root being
|
||||
NULL, so this function can be applied to unpopulated trees as well, fix
|
||||
provided by Simon Kagedal <sika8225@csd.uu.se>.
|
||||
|
||||
Sun Jan 17 11:17:19 1999 Christopher Blizzard <blizzard@appliedtheory.com>
|
||||
|
||||
* glib.spec: add packager address
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sun Jan 17 17:15:59 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtree.c (g_tree_traverse): removed assertment about rtree->root being
|
||||
NULL, so this function can be applied to unpopulated trees as well, fix
|
||||
provided by Simon Kagedal <sika8225@csd.uu.se>.
|
||||
|
||||
Sun Jan 17 11:17:19 1999 Christopher Blizzard <blizzard@appliedtheory.com>
|
||||
|
||||
* glib.spec: add packager address
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sun Jan 17 17:15:59 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtree.c (g_tree_traverse): removed assertment about rtree->root being
|
||||
NULL, so this function can be applied to unpopulated trees as well, fix
|
||||
provided by Simon Kagedal <sika8225@csd.uu.se>.
|
||||
|
||||
Sun Jan 17 11:17:19 1999 Christopher Blizzard <blizzard@appliedtheory.com>
|
||||
|
||||
* glib.spec: add packager address
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sun Jan 17 17:15:59 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtree.c (g_tree_traverse): removed assertment about rtree->root being
|
||||
NULL, so this function can be applied to unpopulated trees as well, fix
|
||||
provided by Simon Kagedal <sika8225@csd.uu.se>.
|
||||
|
||||
Sun Jan 17 11:17:19 1999 Christopher Blizzard <blizzard@appliedtheory.com>
|
||||
|
||||
* glib.spec: add packager address
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sun Jan 17 17:15:59 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtree.c (g_tree_traverse): removed assertment about rtree->root being
|
||||
NULL, so this function can be applied to unpopulated trees as well, fix
|
||||
provided by Simon Kagedal <sika8225@csd.uu.se>.
|
||||
|
||||
Sun Jan 17 11:17:19 1999 Christopher Blizzard <blizzard@appliedtheory.com>
|
||||
|
||||
* glib.spec: add packager address
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sun Jan 17 17:15:59 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtree.c (g_tree_traverse): removed assertment about rtree->root being
|
||||
NULL, so this function can be applied to unpopulated trees as well, fix
|
||||
provided by Simon Kagedal <sika8225@csd.uu.se>.
|
||||
|
||||
Sun Jan 17 11:17:19 1999 Christopher Blizzard <blizzard@appliedtheory.com>
|
||||
|
||||
* glib.spec: add packager address
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sun Jan 17 17:15:59 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtree.c (g_tree_traverse): removed assertment about rtree->root being
|
||||
NULL, so this function can be applied to unpopulated trees as well, fix
|
||||
provided by Simon Kagedal <sika8225@csd.uu.se>.
|
||||
|
||||
Sun Jan 17 11:17:19 1999 Christopher Blizzard <blizzard@appliedtheory.com>
|
||||
|
||||
* glib.spec: add packager address
|
||||
|
12
glib/gtree.c
12
glib/gtree.c
@ -218,7 +218,8 @@ g_tree_traverse (GTree *tree,
|
||||
|
||||
rtree = (GRealTree*) tree;
|
||||
|
||||
g_return_if_fail (rtree->root != NULL);
|
||||
if (!rtree->root)
|
||||
return;
|
||||
|
||||
switch (traverse_type)
|
||||
{
|
||||
@ -253,7 +254,8 @@ g_tree_search (GTree *tree,
|
||||
|
||||
if (rtree->root)
|
||||
return g_tree_node_search (rtree->root, search_func, data);
|
||||
return NULL;
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gint
|
||||
@ -267,7 +269,8 @@ g_tree_height (GTree *tree)
|
||||
|
||||
if (rtree->root)
|
||||
return g_tree_node_height (rtree->root);
|
||||
return 0;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
gint
|
||||
@ -281,7 +284,8 @@ g_tree_nnodes (GTree *tree)
|
||||
|
||||
if (rtree->root)
|
||||
return g_tree_node_count (rtree->root);
|
||||
return 0;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static GTreeNode*
|
||||
|
12
gtree.c
12
gtree.c
@ -218,7 +218,8 @@ g_tree_traverse (GTree *tree,
|
||||
|
||||
rtree = (GRealTree*) tree;
|
||||
|
||||
g_return_if_fail (rtree->root != NULL);
|
||||
if (!rtree->root)
|
||||
return;
|
||||
|
||||
switch (traverse_type)
|
||||
{
|
||||
@ -253,7 +254,8 @@ g_tree_search (GTree *tree,
|
||||
|
||||
if (rtree->root)
|
||||
return g_tree_node_search (rtree->root, search_func, data);
|
||||
return NULL;
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gint
|
||||
@ -267,7 +269,8 @@ g_tree_height (GTree *tree)
|
||||
|
||||
if (rtree->root)
|
||||
return g_tree_node_height (rtree->root);
|
||||
return 0;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
gint
|
||||
@ -281,7 +284,8 @@ g_tree_nnodes (GTree *tree)
|
||||
|
||||
if (rtree->root)
|
||||
return g_tree_node_count (rtree->root);
|
||||
return 0;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static GTreeNode*
|
||||
|
Loading…
Reference in New Issue
Block a user