mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Audit and fix incorrect use of (closure) in glib
Following Emmanuele's instructions for use of introspection annotations: https://www.bassi.io/articles/2023/02/20/bindable-api-2023/ I have audited all uses of the (closure) annotation in glib and determined that only a handful are correct. This commit changes almost all of our use of (closure) annotations to conform to Emmanuele's rules.
This commit is contained in:
committed by
Philip Withnall
parent
9cb52d9f3b
commit
5d738ddcfe
@@ -295,7 +295,7 @@ g_simple_async_result_init (GSimpleAsyncResult *simple)
|
||||
* g_simple_async_result_new:
|
||||
* @source_object: (nullable): a #GObject, or %NULL.
|
||||
* @callback: (scope async): a #GAsyncReadyCallback.
|
||||
* @user_data: (closure): user data passed to @callback.
|
||||
* @user_data: user data passed to @callback.
|
||||
* @source_tag: the asynchronous function.
|
||||
*
|
||||
* Creates a #GSimpleAsyncResult.
|
||||
@@ -339,7 +339,7 @@ g_simple_async_result_new (GObject *source_object,
|
||||
* g_simple_async_result_new_from_error:
|
||||
* @source_object: (nullable): a #GObject, or %NULL.
|
||||
* @callback: (scope async): a #GAsyncReadyCallback.
|
||||
* @user_data: (closure): user data passed to @callback.
|
||||
* @user_data: user data passed to @callback.
|
||||
* @error: a #GError
|
||||
*
|
||||
* Creates a #GSimpleAsyncResult from an error condition.
|
||||
@@ -369,8 +369,8 @@ g_simple_async_result_new_from_error (GObject *source_object,
|
||||
/**
|
||||
* g_simple_async_result_new_take_error: (skip)
|
||||
* @source_object: (nullable): a #GObject, or %NULL
|
||||
* @callback: (scope async): a #GAsyncReadyCallback
|
||||
* @user_data: (closure): user data passed to @callback
|
||||
* @callback: (scope async): a #GAsyncReadyCallback.
|
||||
* @user_data: user data passed to @callback.
|
||||
* @error: a #GError
|
||||
*
|
||||
* Creates a #GSimpleAsyncResult from an error condition, and takes over the
|
||||
@@ -404,7 +404,7 @@ g_simple_async_result_new_take_error (GObject *source_object,
|
||||
* g_simple_async_result_new_error:
|
||||
* @source_object: (nullable): a #GObject, or %NULL.
|
||||
* @callback: (scope async): a #GAsyncReadyCallback.
|
||||
* @user_data: (closure): user data passed to @callback.
|
||||
* @user_data: user data passed to @callback.
|
||||
* @domain: a #GQuark.
|
||||
* @code: an error code.
|
||||
* @format: a string with format characters.
|
||||
@@ -1051,7 +1051,7 @@ g_simple_async_report_error_in_idle (GObject *object,
|
||||
* g_simple_async_report_gerror_in_idle:
|
||||
* @object: (nullable): a #GObject, or %NULL
|
||||
* @callback: (scope async): a #GAsyncReadyCallback.
|
||||
* @user_data: (closure): user data passed to @callback.
|
||||
* @user_data: user data passed to @callback.
|
||||
* @error: the #GError to report
|
||||
*
|
||||
* Reports an error in an idle function. Similar to
|
||||
|
Reference in New Issue
Block a user