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/.
This commit is contained in:
Sebastian Wilhelmi
2000-04-26 08:42:19 +00:00
committed by Sebastian Wilhelmi
parent 7e3c98f8e9
commit d5fccfb0eb
16 changed files with 164 additions and 72 deletions

6
gmem.c
View File

@@ -576,7 +576,7 @@ g_mem_chunk_alloc (GMemChunk *mem_chunk)
/* Determine which area this piece of memory is allocated from */
temp_area = g_tree_search (rmem_chunk->mem_tree,
(GSearchFunc) g_mem_chunk_area_search,
(GCompareFunc) g_mem_chunk_area_search,
mem);
/* If the area has been marked, then it is being destroyed.
@@ -736,7 +736,7 @@ g_mem_chunk_free (GMemChunk *mem_chunk,
rmem_chunk->free_atoms = free_atom;
temp_area = g_tree_search (rmem_chunk->mem_tree,
(GSearchFunc) g_mem_chunk_area_search,
(GCompareFunc) g_mem_chunk_area_search,
mem);
temp_area->allocated -= 1;
@@ -775,7 +775,7 @@ g_mem_chunk_clean (GMemChunk *mem_chunk)
mem = (gpointer) temp_free_atom;
mem_area = g_tree_search (rmem_chunk->mem_tree,
(GSearchFunc) g_mem_chunk_area_search,
(GCompareFunc) g_mem_chunk_area_search,
mem);
/* If this mem area is marked for destruction then delete the