summaryrefslogtreecommitdiff
path: root/gtree.c
diff options
context:
space:
mode:
authorSebastian Wilhelmi <wilhelmi@ira.uka.de>2000-04-26 08:42:19 +0000
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>2000-04-26 08:42:19 +0000
commitd5fccfb0eb2ec99fc29845082c72a5dc0a66045a (patch)
tree26726447ee1187541fbb0d08f00056f297220f12 /gtree.c
parent7e3c98f8e96449618b3f9dc4d5a3ec1fcd7aa37a (diff)
Changed the 'value' parameter of g_cache_remove from gpointer to
2000-04-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * glib.h, gcache.c, gtree.c: Changed the 'value' parameter of g_cache_remove from gpointer to gconstpointer. Dito for the 'key' parameter of g_tree_lookup and g_tree_remove and the 'data' parameter of g_tree_serach. This function now takes a function of type GCompareFunc instead of GSearchFunc. * glib.h: Removed declaration of GSearchFunc. * gmem.c: s/GSearchFunc/GCompareFunc/.
Diffstat (limited to 'gtree.c')
-rw-r--r--gtree.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/gtree.c b/gtree.c
index c2f97deaa..1f29951b0 100644
--- a/gtree.c
+++ b/gtree.c
@@ -60,7 +60,7 @@ static GTreeNode* g_tree_node_insert (GTreeNode *node,
gint *inserted);
static GTreeNode* g_tree_node_remove (GTreeNode *node,
GCompareFunc compare,
- gpointer key);
+ gconstpointer key);
static GTreeNode* g_tree_node_balance (GTreeNode *node);
static GTreeNode* g_tree_node_remove_leftmost (GTreeNode *node,
GTreeNode **leftmost);
@@ -70,7 +70,7 @@ static GTreeNode* g_tree_node_restore_right_balance (GTreeNode *node,
gint old_balance);
static gpointer g_tree_node_lookup (GTreeNode *node,
GCompareFunc compare,
- gpointer key);
+ gconstpointer key);
static gint g_tree_node_count (GTreeNode *node);
static gint g_tree_node_pre_order (GTreeNode *node,
GTraverseFunc traverse_func,
@@ -82,8 +82,8 @@ static gint g_tree_node_post_order (GTreeNode *node,
GTraverseFunc traverse_func,
gpointer data);
static gpointer g_tree_node_search (GTreeNode *node,
- GSearchFunc search_func,
- gpointer data);
+ GCompareFunc search_func,
+ gconstpointer data);
static gint g_tree_node_height (GTreeNode *node);
static GTreeNode* g_tree_node_rotate_left (GTreeNode *node);
static GTreeNode* g_tree_node_rotate_right (GTreeNode *node);
@@ -195,8 +195,8 @@ g_tree_insert (GTree *tree,
}
void
-g_tree_remove (GTree *tree,
- gpointer key)
+g_tree_remove (GTree *tree,
+ gconstpointer key)
{
GRealTree *rtree;
@@ -208,8 +208,8 @@ g_tree_remove (GTree *tree,
}
gpointer
-g_tree_lookup (GTree *tree,
- gpointer key)
+g_tree_lookup (GTree *tree,
+ gconstpointer key)
{
GRealTree *rtree;
@@ -256,9 +256,9 @@ g_tree_traverse (GTree *tree,
}
gpointer
-g_tree_search (GTree *tree,
- GSearchFunc search_func,
- gpointer data)
+g_tree_search (GTree *tree,
+ GCompareFunc search_func,
+ gconstpointer data)
{
GRealTree *rtree;
@@ -371,9 +371,9 @@ g_tree_node_insert (GTreeNode *node,
}
static GTreeNode*
-g_tree_node_remove (GTreeNode *node,
- GCompareFunc compare,
- gpointer key)
+g_tree_node_remove (GTreeNode *node,
+ GCompareFunc compare,
+ gconstpointer key)
{
GTreeNode *new_root;
gint old_balance;
@@ -503,9 +503,9 @@ g_tree_node_restore_right_balance (GTreeNode *node,
}
static gpointer
-g_tree_node_lookup (GTreeNode *node,
- GCompareFunc compare,
- gpointer key)
+g_tree_node_lookup (GTreeNode *node,
+ GCompareFunc compare,
+ gconstpointer key)
{
gint cmp;
@@ -608,9 +608,9 @@ g_tree_node_post_order (GTreeNode *node,
}
static gpointer
-g_tree_node_search (GTreeNode *node,
- GSearchFunc search_func,
- gpointer data)
+g_tree_node_search (GTreeNode *node,
+ GCompareFunc search_func,
+ gconstpointer data)
{
gint dir;