gclosure: Fix (transfer) annotations on GClosure constructors

They return floating references. The convention established by GVariant
is to annotate these as (transfer none) so that the caller does a
ref+sink on them, rather than just a ref.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=677233
This commit is contained in:
Philip Withnall 2017-10-05 15:20:34 +01:00
parent 121b1e5215
commit 9cbff9f768

View File

@ -184,7 +184,7 @@ enum {
* }
* ]|
*
* Returns: (transfer full): a newly allocated #GClosure
* Returns: (transfer none): a floating reference to a new #GClosure
*/
GClosure*
g_closure_new_simple (guint sizeof_closure,
@ -930,7 +930,7 @@ _g_closure_set_va_marshal (GClosure *closure,
* Creates a new closure which invokes @callback_func with @user_data as
* the last parameter.
*
* Returns: a new #GCClosure
* Returns: (transfer none): a floating reference to a new #GCClosure
*/
GClosure*
g_cclosure_new (GCallback callback_func,
@ -958,7 +958,7 @@ g_cclosure_new (GCallback callback_func,
* Creates a new closure which invokes @callback_func with @user_data as
* the first parameter.
*
* Returns: (transfer full): a new #GCClosure
* Returns: (transfer none): a floating reference to a new #GCClosure
*/
GClosure*
g_cclosure_new_swap (GCallback callback_func,
@ -1126,7 +1126,7 @@ g_type_iface_meta_marshalv (GClosure *closure,
* @struct_offset in the class structure of the interface or classed type
* identified by @itype.
*
* Returns: a new #GCClosure
* Returns: (transfer none): a floating reference to a new #GCClosure
*/
GClosure*
g_signal_type_cclosure_new (GType itype,