summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>1999-01-17 16:56:28 +0000
committerTim Janik <timj@src.gnome.org>1999-01-17 16:56:28 +0000
commit6db5c264f96cdbf14c521099ef03f10927c8d998 (patch)
treec1b0548ea3b4c8df80be163bae9b6d94de7fb35a
parent48763aea23a995b8d1af15d931c99baa49b24879 (diff)
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>.
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.pre-2-06
-rw-r--r--ChangeLog.pre-2-106
-rw-r--r--ChangeLog.pre-2-126
-rw-r--r--ChangeLog.pre-2-26
-rw-r--r--ChangeLog.pre-2-46
-rw-r--r--ChangeLog.pre-2-66
-rw-r--r--ChangeLog.pre-2-86
-rw-r--r--glib/gtree.c12
-rw-r--r--gtree.c12
10 files changed, 64 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 10f5ec23a..0cc27237d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 10f5ec23a..0cc27237d 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -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
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 10f5ec23a..0cc27237d 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -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
diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12
index 10f5ec23a..0cc27237d 100644
--- a/ChangeLog.pre-2-12
+++ b/ChangeLog.pre-2-12
@@ -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
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 10f5ec23a..0cc27237d 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -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
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 10f5ec23a..0cc27237d 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -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
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 10f5ec23a..0cc27237d 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -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
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 10f5ec23a..0cc27237d 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -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
diff --git a/glib/gtree.c b/glib/gtree.c
index 0fbf62f80..5b4e342bb 100644
--- a/glib/gtree.c
+++ b/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*
diff --git a/gtree.c b/gtree.c
index 0fbf62f80..5b4e342bb 100644
--- a/gtree.c
+++ b/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*