mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-23 17:38:54 +02:00
Stop dithering over GPrivate
Take out the half-private g_private_init() stuff and replace it with a G_PRIVATE_INIT macro that allows specifying a GDestroyNotify. Expose the GPrivate structure in a public header. Add a g_private_replace() to (sort of) match the functionality of g_static_mutex_set(). Improve the documentation. Deprecate g_private_new().
This commit is contained in:
@@ -172,24 +172,10 @@ GCond *cond
|
||||
</FUNCTION>
|
||||
|
||||
# GPrivate
|
||||
|
||||
<FUNCTION>
|
||||
<NAME>g_private_new</NAME>
|
||||
<RETURNS>GPrivate*</RETURNS>
|
||||
GDestroyNotify destructor
|
||||
</FUNCTION>
|
||||
|
||||
<FUNCTION>
|
||||
<NAME>g_private_get</NAME>
|
||||
<RETURNS>gpointer</RETURNS>
|
||||
GPrivate *private_key
|
||||
</FUNCTION>
|
||||
|
||||
<FUNCTION>
|
||||
<NAME>g_private_set</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
GPrivate *private_key, gpointer data
|
||||
</FUNCTION>
|
||||
<MACRO>
|
||||
<NAME>G_PRIVATE_INIT</NAME>
|
||||
#define G_PRIVATE_INIT(notify)
|
||||
</MACRO>
|
||||
|
||||
# GStaticPrivate
|
||||
|
||||
|
@@ -691,9 +691,13 @@ g_cond_broadcast
|
||||
|
||||
<SUBSECTION>
|
||||
GPrivate
|
||||
g_private_new
|
||||
G_PRIVATE_INIT
|
||||
g_private_get
|
||||
g_private_set
|
||||
g_private_replace
|
||||
|
||||
<SUBSECTION>
|
||||
g_private_new
|
||||
|
||||
<SUBSECTION>
|
||||
GStaticPrivate
|
||||
|
Reference in New Issue
Block a user