diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2005-12-27 00:59:53 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-12-27 00:59:53 +0000 |
commit | 74a19d9f39c28cb8b6b913f9812e14bc95dc9a2f (patch) | |
tree | 1f0643984b39899636e282baf6084e0efc49b77e /gtk/gtktextbtree.c | |
parent | e572ab94b0a80c9dd1dab4dcfeebb5f1a2f1659b (diff) | |
download | gtk+-74a19d9f39c28cb8b6b913f9812e14bc95dc9a2f.tar.gz |
some more slice allocation
Diffstat (limited to 'gtk/gtktextbtree.c')
-rw-r--r-- | gtk/gtktextbtree.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c index 8ac0f9d081..7916c88a18 100644 --- a/gtk/gtktextbtree.c +++ b/gtk/gtktextbtree.c @@ -4758,7 +4758,7 @@ node_data_new (gpointer view_id) { NodeData *nd; - nd = g_new (NodeData, 1); + nd = g_slice_new (NodeData); nd->view_id = view_id; nd->next = NULL; @@ -4772,26 +4772,18 @@ node_data_new (gpointer view_id) static void node_data_destroy (NodeData *nd) { - g_free (nd); + g_slice_free (NodeData, nd); } static void node_data_list_destroy (NodeData *nd) { - NodeData *iter; - NodeData *next; - - iter = nd; - while (iter != NULL) - { - next = iter->next; - node_data_destroy (iter); - iter = next; - } + g_slice_free_chain (NodeData, nd, next); } static NodeData* -node_data_find (NodeData *nd, gpointer view_id) +node_data_find (NodeData *nd, + gpointer view_id) { while (nd != NULL) { |