allocate structs using GSlice.

2007-05-31  Sven Neumann  <sven@gimp.org>

	* plug-ins/helpbrowser/queue.c:  allocate structs using GSlice.

svn path=/trunk/; revision=22684
This commit is contained in:
Sven Neumann
2007-05-31 12:25:42 +00:00
committed by Sven Neumann
parent 2957d402cf
commit 3f1114859f
2 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2007-05-31 Sven Neumann <sven@gimp.org>
* plug-ins/helpbrowser/queue.c: allocate structs using GSlice.
2007-05-31 Mukund Sivaraman <muks@mukund.org>
* plug-ins/Lighting/lighting_ui.c

View File

@ -46,7 +46,7 @@ typedef struct
static Item *
item_new (const gchar *uri)
{
Item *item = g_new0 (Item, 1);
Item *item = g_slice_new0 (Item);
item->uri = g_strdup (uri);
@ -59,14 +59,14 @@ item_free (Item *item)
g_free (item->uri);
g_free (item->title);
g_free (item);
g_slice_free (Item, item);
}
Queue *
queue_new (void)
{
return g_new0 (Queue, 1);
return g_slice_new0 (Queue);
}
void
@ -81,7 +81,7 @@ queue_free (Queue *h)
g_list_free (h->queue);
}
g_free (h);
g_slice_free (Queue, h);
}
void