summaryrefslogtreecommitdiff
path: root/gtk/gtktreedatalist.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-12-05 21:28:32 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-12-05 21:28:32 +0000
commit7dc70fba99b832c9c2f3aef590f0b3427078a5fb (patch)
tree3d544d4d7f665c0017aec664a87fb53e5b99e5f9 /gtk/gtktreedatalist.c
parent40894e9a49bb7d177d31b388b0e12a877bd491e4 (diff)
downloadgtk+-7dc70fba99b832c9c2f3aef590f0b3427078a5fb.tar.gz
Use g_slice instead of mem chunks.
2005-12-05 Matthias Clasen <mclasen@redhat.com> * gtk/gtkwidget.c: * gtk/gtkuimanager.c: * gtk/gtktreedatalist.c: * gtk/gtktext.c: * gtk/gtkmain.c: * gtk/gtkitemfactory.c: * gtk/gtkseparator.[hc]: * gtk/gtkclist.[hc]: * gtk/gtkctree.c: * gtk/gtkgc.c: Use g_slice instead of mem chunks.
Diffstat (limited to 'gtk/gtktreedatalist.c')
-rw-r--r--gtk/gtktreedatalist.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/gtk/gtktreedatalist.c b/gtk/gtktreedatalist.c
index a70a53d820..9cbd26a7aa 100644
--- a/gtk/gtktreedatalist.c
+++ b/gtk/gtktreedatalist.c
@@ -24,8 +24,6 @@
#include "gtktreedatalist.h"
#include "gtkalias.h"
#include <string.h>
-static GMemChunk *tree_chunk = NULL;
-#define TREE_CHUNK_PREALLOCS 64
/* node allocation
*/
@@ -34,14 +32,7 @@ _gtk_tree_data_list_alloc (void)
{
GtkTreeDataList *list;
- if (tree_chunk == NULL)
- tree_chunk = g_mem_chunk_new ("treedatalist mem chunk",
- sizeof (GtkTreeDataList),
- sizeof (GtkTreeDataList) * TREE_CHUNK_PREALLOCS,
- G_ALLOC_AND_FREE);
-
- list = g_chunk_new (GtkTreeDataList, tree_chunk);
- memset (list, 0, sizeof (GtkTreeDataList));
+ list = g_slice_new0 (GtkTreeDataList);
return list;
}
@@ -65,7 +56,7 @@ _gtk_tree_data_list_free (GtkTreeDataList *list,
else if (g_type_is_a (column_headers [i], G_TYPE_BOXED) && tmp->data.v_pointer != NULL)
g_boxed_free (column_headers [i], (gpointer) tmp->data.v_pointer);
- g_mem_chunk_free (tree_chunk, tmp);
+ g_slice_free (GtkTreeDataList, tmp);
i++;
tmp = next;
}