g_private_new: use GSlice

We no longer call g_private_new() from anywhere in GLib, so we can use
gslice instead of malloc().
This commit is contained in:
Ryan Lortie 2011-09-18 22:48:53 -04:00
parent 0ebd842d24
commit 835c9b75c8

View File

@ -2455,7 +2455,7 @@ g_private_new (GDestroyNotify notify)
{
GPrivate *key;
key = malloc (sizeof (GPrivate));
key = g_slice_new (GPrivate);
g_private_init (key, notify);
return key;