Merge branch 'update-closure-annotations' into 'main'

Fix closure annotations in callbacks' user data parameters

See merge request GNOME/glib!2633
This commit is contained in:
Sebastian Dröge 2022-05-05 08:59:17 +00:00
commit 8cf0c13e6d
4 changed files with 14 additions and 14 deletions

View File

@ -135,8 +135,8 @@ typedef enum
* single dash followed by a single letter (for a short name) or two dashes
* followed by a long option name.
* @value: The value to be parsed.
* @data: User data added to the #GOptionGroup containing the option when it
* was created with g_option_group_new()
* @user_data: User data added to the #GOptionGroup containing the option when
* it was created with g_option_group_new()
* @error: A return location for errors. The error code %G_OPTION_ERROR_FAILED
* is intended to be used for errors in #GOptionArgFunc callbacks.
*
@ -148,15 +148,15 @@ typedef enum
*/
typedef gboolean (*GOptionArgFunc) (const gchar *option_name,
const gchar *value,
gpointer data,
gpointer user_data,
GError **error);
/**
* GOptionParseFunc:
* @context: The active #GOptionContext
* @group: The group to which the function belongs
* @data: User data added to the #GOptionGroup containing the option when it
* was created with g_option_group_new()
* @user_data: User data added to the #GOptionGroup containing the option when
* it was created with g_option_group_new()
* @error: A return location for error details
*
* The type of function that can be called before and after parsing.
@ -166,22 +166,22 @@ typedef gboolean (*GOptionArgFunc) (const gchar *option_name,
*/
typedef gboolean (*GOptionParseFunc) (GOptionContext *context,
GOptionGroup *group,
gpointer data,
gpointer user_data,
GError **error);
/**
* GOptionErrorFunc:
* @context: The active #GOptionContext
* @group: The group to which the function belongs
* @data: User data added to the #GOptionGroup containing the option when it
* was created with g_option_group_new()
* @user_data: User data added to the #GOptionGroup containing the option when
* it was created with g_option_group_new()
* @error: The #GError containing details about the parse error
*
* The type of function to be used as callback when a parse error occurs.
*/
typedef void (*GOptionErrorFunc) (GOptionContext *context,
GOptionGroup *group,
gpointer data,
gpointer user_data,
GError **error);
/**

View File

@ -102,7 +102,7 @@ typedef enum
/**
* GSpawnChildSetupFunc:
* @user_data: (closure): user data to pass to the function.
* @user_data: user data to pass to the function.
*
* Specifies the type of the setup function passed to g_spawn_async(),
* g_spawn_sync() and g_spawn_async_with_pipes(), which can, in very

View File

@ -53,7 +53,7 @@ typedef gboolean (*GTraverseFunc) (gpointer key,
/**
* GTraverseNodeFunc:
* @node: a #GTreeNode
* @data: user data passed to g_tree_foreach_node()
* @user_data: user data passed to g_tree_foreach_node()
*
* Specifies the type of function passed to g_tree_foreach_node(). It is
* passed each node, together with the @user_data parameter passed to
@ -64,7 +64,7 @@ typedef gboolean (*GTraverseFunc) (gpointer key,
* Since: 2.68
*/
typedef gboolean (*GTraverseNodeFunc) (GTreeNode *node,
gpointer data);
gpointer user_data);
/* Balanced binary trees
*/

View File

@ -166,7 +166,7 @@ typedef void (*GFreeFunc) (gpointer data);
/**
* GTranslateFunc:
* @str: the untranslated string
* @data: user data specified when installing the function, e.g.
* @user_data: user data specified when installing the function, e.g.
* in g_option_group_set_translate_func()
*
* The type of functions which are used to translate user-visible
@ -176,7 +176,7 @@ typedef void (*GFreeFunc) (gpointer data);
* The returned string is owned by GLib and must not be freed.
*/
typedef const gchar * (*GTranslateFunc) (const gchar *str,
gpointer data);
gpointer user_data);
/* Define some mathematical constants that aren't available