[glib] Advise against using GPrivate
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Advise against using GPrivate
- Date: Thu, 21 Jul 2011 07:21:56 +0000 (UTC)
commit 79b80579282b2749a9eafe8b95845f434db95969
Author: Ryan Lortie <desrt desrt ca>
Date: Thu Jul 21 09:21:18 2011 +0200
Advise against using GPrivate
GStaticPrivate is really a lot better in almost every way.
glib/gthread.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/glib/gthread.c b/glib/gthread.c
index 44075b6..58d76c7 100644
--- a/glib/gthread.c
+++ b/glib/gthread.c
@@ -682,6 +682,10 @@ GThreadFunctions g_thread_functions_for_glib_use = {
/**
* GPrivate:
*
+ * <note><para>
+ * #GStaticPrivate is a better choice for most uses.
+ * </para></note>
+ *
* The #GPrivate struct is an opaque data structure to represent a
* thread private data key. Threads can thereby obtain and set a
* pointer which is private to the current thread. Take our
@@ -741,6 +745,10 @@ GThreadFunctions g_thread_functions_for_glib_use = {
* non-%NULL, the destructor is called with this pointer as the
* argument.
*
+ * <note><para>
+ * #GStaticPrivate is a better choice for most uses.
+ * </para></note>
+ *
* <note><para>@destructor is used quite differently from @notify in
* g_static_private_set().</para></note>
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]