[glib] gclosure: Fix (transfer) annotations on GClosure constructors
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gclosure: Fix (transfer) annotations on GClosure constructors
- Date: Fri, 6 Oct 2017 10:18:35 +0000 (UTC)
commit 9cbff9f76854c803a2b2cec01614d4cc37e57d91
Author: Philip Withnall <withnall endlessm com>
Date: Thu Oct 5 15:20:34 2017 +0100
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
gobject/gclosure.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gobject/gclosure.c b/gobject/gclosure.c
index 27de53f..4d3031c 100644
--- a/gobject/gclosure.c
+++ b/gobject/gclosure.c
@@ -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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]