Merge branch 'constructor-annotations' into 'main'

Mark a couple of functions as constructors and not methods

See merge request GNOME/glib!4817
This commit is contained in:
Philip Withnall
2025-09-18 11:53:50 +00:00
2 changed files with 7 additions and 7 deletions

View File

@@ -1196,7 +1196,7 @@ g_static_rw_lock_free (GStaticRWLock* lock)
/* GPrivate {{{1 ------------------------------------------------------ */ /* GPrivate {{{1 ------------------------------------------------------ */
/** /**
* g_private_new: (skip): * g_private_new: (skip) (constructor) (not method):
* @notify: a #GDestroyNotify * @notify: a #GDestroyNotify
* *
* Creates a new #GPrivate. * Creates a new #GPrivate.
@@ -1204,7 +1204,7 @@ g_static_rw_lock_free (GStaticRWLock* lock)
* Deprecated:2.32: dynamic allocation of #GPrivate is a bad idea. Use * Deprecated:2.32: dynamic allocation of #GPrivate is a bad idea. Use
* static storage and G_PRIVATE_INIT() instead. * static storage and G_PRIVATE_INIT() instead.
* *
* Returns: a newly allocated #GPrivate (which can never be destroyed) * Returns: (transfer full): a newly allocated #GPrivate (which can never be destroyed)
*/ */
GPrivate * GPrivate *
g_private_new (GDestroyNotify notify) g_private_new (GDestroyNotify notify)
@@ -1443,11 +1443,11 @@ g_static_private_free (GStaticPrivate *private_key)
/* GMutex {{{1 ------------------------------------------------------ */ /* GMutex {{{1 ------------------------------------------------------ */
/** /**
* g_mutex_new: (skip): * g_mutex_new: (skip) (constructor) (not method):
* *
* Allocates and initializes a new #GMutex. * Allocates and initializes a new #GMutex.
* *
* Returns: a newly allocated #GMutex. Use g_mutex_free() to free * Returns: (transfer full): a newly allocated #GMutex. Use g_mutex_free() to free
* *
* Deprecated: 2.32: GMutex can now be statically allocated, or embedded * Deprecated: 2.32: GMutex can now be statically allocated, or embedded
* in structures and initialised with g_mutex_init(). * in structures and initialised with g_mutex_init().
@@ -1485,11 +1485,11 @@ g_mutex_free (GMutex *mutex)
/* GCond {{{1 ------------------------------------------------------ */ /* GCond {{{1 ------------------------------------------------------ */
/** /**
* g_cond_new: (skip): * g_cond_new: (skip) (constructor) (not method):
* *
* Allocates and initializes a new #GCond. * Allocates and initializes a new #GCond.
* *
* Returns: a newly allocated #GCond. Free with g_cond_free() * Returns: (transfer full): a newly allocated #GCond. Free with g_cond_free()
* *
* Deprecated: 2.32: GCond can now be statically allocated, or embedded * Deprecated: 2.32: GCond can now be statically allocated, or embedded
* in structures and initialised with g_cond_init(). * in structures and initialised with g_cond_init().

View File

@@ -240,7 +240,7 @@ g_bytes_new_with_free_func (gconstpointer data,
} }
/** /**
* g_bytes_new_from_bytes: * g_bytes_new_from_bytes: (constructor) (not method):
* @bytes: a [struct@GLib.Bytes] * @bytes: a [struct@GLib.Bytes]
* @offset: offset which subsection starts at * @offset: offset which subsection starts at
* @length: length of subsection * @length: length of subsection