Merge branch 'floating-closures' into 'main'

gclosure: Documentation improvements around floating closures

See merge request GNOME/glib!3103
This commit is contained in:
Sebastian Dröge 2022-12-02 12:25:07 +00:00
commit 108f129096
2 changed files with 10 additions and 4 deletions

View File

@ -190,7 +190,7 @@ enum {
* } * }
* ]| * ]|
* *
* Returns: (transfer none): a floating reference to a new #GClosure * Returns: (transfer floating): a floating reference to a new #GClosure
*/ */
GClosure* GClosure*
g_closure_new_simple (guint sizeof_closure, g_closure_new_simple (guint sizeof_closure,
@ -964,7 +964,7 @@ _g_closure_set_va_marshal (GClosure *closure,
* *
* @destroy_data will be called as a finalize notifier on the #GClosure. * @destroy_data will be called as a finalize notifier on the #GClosure.
* *
* Returns: (transfer none): a floating reference to a new #GCClosure * Returns: (transfer floating): a floating reference to a new #GCClosure
*/ */
GClosure* GClosure*
g_cclosure_new (GCallback callback_func, g_cclosure_new (GCallback callback_func,
@ -994,7 +994,7 @@ g_cclosure_new (GCallback callback_func,
* *
* @destroy_data will be called as a finalize notifier on the #GClosure. * @destroy_data will be called as a finalize notifier on the #GClosure.
* *
* Returns: (transfer none): a floating reference to a new #GCClosure * Returns: (transfer floating): a floating reference to a new #GCClosure
*/ */
GClosure* GClosure*
g_cclosure_new_swap (GCallback callback_func, g_cclosure_new_swap (GCallback callback_func,
@ -1162,7 +1162,7 @@ g_type_iface_meta_marshalv (GClosure *closure,
* @struct_offset in the class structure of the interface or classed type * @struct_offset in the class structure of the interface or classed type
* identified by @itype. * identified by @itype.
* *
* Returns: (transfer none): a floating reference to a new #GCClosure * Returns: (transfer floating): a floating reference to a new #GCClosure
*/ */
GClosure* GClosure*
g_signal_type_cclosure_new (GType itype, g_signal_type_cclosure_new (GType itype,

View File

@ -2400,6 +2400,9 @@ g_signal_get_invocation_hint (gpointer instance)
* *
* Connects a closure to a signal for a particular object. * Connects a closure to a signal for a particular object.
* *
* If @closure is a floating reference (see g_closure_sink()), this function
* takes ownership of @closure.
*
* Returns: the handler ID (always greater than 0 for successful connections) * Returns: the handler ID (always greater than 0 for successful connections)
*/ */
gulong gulong
@ -2462,6 +2465,9 @@ g_signal_connect_closure_by_id (gpointer instance,
* *
* Connects a closure to a signal for a particular object. * Connects a closure to a signal for a particular object.
* *
* If @closure is a floating reference (see g_closure_sink()), this function
* takes ownership of @closure.
*
* Returns: the handler ID (always greater than 0 for successful connections) * Returns: the handler ID (always greater than 0 for successful connections)
*/ */
gulong gulong