[glib] g_private_new: use GSlice
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] g_private_new: use GSlice
- Date: Wed, 21 Sep 2011 20:19:48 +0000 (UTC)
commit 835c9b75c8adb20f8a095a2bea486d59f16e72cc
Author: Ryan Lortie <desrt desrt ca>
Date: Sun Sep 18 22:48:53 2011 -0400
g_private_new: use GSlice
We no longer call g_private_new() from anywhere in GLib, so we can use
gslice instead of malloc().
glib/gthread.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glib/gthread.c b/glib/gthread.c
index 87e9199..e45360e 100644
--- a/glib/gthread.c
+++ b/glib/gthread.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]