mirror of https://github.com/GNOME/gimp.git
allocate parasites using GSlice.
2007-05-25 Sven Neumann <sven@gimp.org> * libgimpbase/gimpparasite.c: allocate parasites using GSlice. svn path=/trunk/; revision=22613
This commit is contained in:
parent
07240ed1f9
commit
638d514d81
|
@ -1,3 +1,7 @@
|
|||
2007-05-25 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimpbase/gimpparasite.c: allocate parasites using GSlice.
|
||||
|
||||
2007-05-25 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* gimptool-2.0.in: require pkg-config and use it to determine
|
||||
|
|
|
@ -207,10 +207,11 @@ gimp_parasite_new (const gchar *name,
|
|||
if (!name)
|
||||
return NULL;
|
||||
|
||||
parasite = g_new (GimpParasite, 1);
|
||||
parasite = g_slice_new (GimpParasite);
|
||||
parasite->name = g_strdup (name);
|
||||
parasite->flags = (flags & 0xFF);
|
||||
parasite->size = size;
|
||||
|
||||
if (size)
|
||||
parasite->data = g_memdup (data, size);
|
||||
else
|
||||
|
@ -227,10 +228,11 @@ gimp_parasite_free (GimpParasite *parasite)
|
|||
|
||||
if (parasite->name)
|
||||
g_free (parasite->name);
|
||||
|
||||
if (parasite->data)
|
||||
g_free (parasite->data);
|
||||
|
||||
g_free (parasite);
|
||||
g_slice_free (GimpParasite, parasite);
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
|
Loading…
Reference in New Issue