[glib: 1/3] Rename all user datas in callbacks to user_data
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/3] Rename all user datas in callbacks to user_data
- Date: Thu, 5 May 2022 08:59:19 +0000 (UTC)
commit 1422e5f81241650c634413911e92d23495692545
Author: TestingPlant <49836-TestingPlant users noreply gitlab gnome org>
Date: Thu May 5 01:51:48 2022 +0000
Rename all user datas in callbacks to user_data
The user data parameters in callbacks need to be named user_data to
generate correct closure attributes in the introspection data.
glib/goption.h | 18 +++++++++---------
glib/gtree.h | 4 ++--
glib/gtypes.h | 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/glib/goption.h b/glib/goption.h
index 7e9c1a3f1f..04638e4a55 100644
--- a/glib/goption.h
+++ b/glib/goption.h
@@ -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);
/**
diff --git a/glib/gtree.h b/glib/gtree.h
index ff11ba4357..d1e9107bfb 100644
--- a/glib/gtree.h
+++ b/glib/gtree.h
@@ -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
*/
diff --git a/glib/gtypes.h b/glib/gtypes.h
index 3d8763df55..fe11ebe6fe 100644
--- a/glib/gtypes.h
+++ b/glib/gtypes.h
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]