[glib/wip/mutexes] g_private_new: use GSlice
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/mutexes] g_private_new: use GSlice
- Date: Mon, 19 Sep 2011 02:50:25 +0000 (UTC)
commit 4c048a8534076a001790bc9a06d569eb62c34aab
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 750a4ce..e8e5950 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]