g_private_new: use GSlice
authorRyan Lortie <desrt@desrt.ca>
Mon, 19 Sep 2011 02:48:53 +0000 (22:48 -0400)
committerRyan Lortie <desrt@desrt.ca>
Wed, 21 Sep 2011 20:06:54 +0000 (16:06 -0400)
We no longer call g_private_new() from anywhere in GLib, so we can use
gslice instead of malloc().

glib/gthread.c

index 87e9199..e45360e 100644 (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;