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:

committed by
Sven Neumann

parent
2957d402cf
commit
3f1114859f
@ -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>
|
2007-05-31 Mukund Sivaraman <muks@mukund.org>
|
||||||
|
|
||||||
* plug-ins/Lighting/lighting_ui.c
|
* plug-ins/Lighting/lighting_ui.c
|
||||||
|
@ -46,7 +46,7 @@ typedef struct
|
|||||||
static Item *
|
static Item *
|
||||||
item_new (const gchar *uri)
|
item_new (const gchar *uri)
|
||||||
{
|
{
|
||||||
Item *item = g_new0 (Item, 1);
|
Item *item = g_slice_new0 (Item);
|
||||||
|
|
||||||
item->uri = g_strdup (uri);
|
item->uri = g_strdup (uri);
|
||||||
|
|
||||||
@ -59,14 +59,14 @@ item_free (Item *item)
|
|||||||
g_free (item->uri);
|
g_free (item->uri);
|
||||||
g_free (item->title);
|
g_free (item->title);
|
||||||
|
|
||||||
g_free (item);
|
g_slice_free (Item, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Queue *
|
Queue *
|
||||||
queue_new (void)
|
queue_new (void)
|
||||||
{
|
{
|
||||||
return g_new0 (Queue, 1);
|
return g_slice_new0 (Queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -81,7 +81,7 @@ queue_free (Queue *h)
|
|||||||
g_list_free (h->queue);
|
g_list_free (h->queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (h);
|
g_slice_free (Queue, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Reference in New Issue
Block a user