From 5b7c109e1c165dff0b6e51ec9451d5236a93b28d Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Thu, 16 Aug 2018 10:58:43 +0100 Subject: [PATCH 1/2] gclosure: Clarify when destroy notifiers are called in documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They’re called in finalize, not invalidate. Signed-off-by: Philip Withnall https://gitlab.gnome.org/GNOME/glib/issues/277 --- gobject/gclosure.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gobject/gclosure.c b/gobject/gclosure.c index 188c74ad8..8c827014d 100644 --- a/gobject/gclosure.c +++ b/gobject/gclosure.c @@ -936,6 +936,8 @@ _g_closure_set_va_marshal (GClosure *closure, * Creates a new closure which invokes @callback_func with @user_data as * the last parameter. * + * @destroy_data will be called as a finalize notifier on the #GClosure. + * * Returns: (transfer none): a floating reference to a new #GCClosure */ GClosure* @@ -964,6 +966,8 @@ g_cclosure_new (GCallback callback_func, * Creates a new closure which invokes @callback_func with @user_data as * the first parameter. * + * @destroy_data will be called as a finalize notifier on the #GClosure. + * * Returns: (transfer none): a floating reference to a new #GCClosure */ GClosure* From 59a23bf24d9648e63525078996c0a7077c4e1aca Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Thu, 16 Aug 2018 10:59:45 +0100 Subject: [PATCH 2/2] gclosure: Minor documentation formatting improvements Signed-off-by: Philip Withnall --- gobject/gclosure.c | 2 +- gobject/gobject.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gobject/gclosure.c b/gobject/gclosure.c index 8c827014d..472f037e2 100644 --- a/gobject/gclosure.c +++ b/gobject/gclosure.c @@ -556,7 +556,7 @@ g_closure_ref (GClosure *closure) /** * g_closure_invalidate: - * @closure: GClosure to invalidate + * @closure: #GClosure to invalidate * * Sets a flag on the closure to indicate that its calling * environment has become invalid, and thus causes any future diff --git a/gobject/gobject.c b/gobject/gobject.c index 534b4fb5c..f82fa8c79 100644 --- a/gobject/gobject.c +++ b/gobject/gobject.c @@ -4109,8 +4109,8 @@ destroy_closure_array (gpointer data) /** * g_object_watch_closure: - * @object: GObject restricting lifetime of @closure - * @closure: GClosure to watch + * @object: #GObject restricting lifetime of @closure + * @closure: #GClosure to watch * * This function essentially limits the life time of the @closure to * the life time of the object. That is, when the object is finalized,