[glib: 1/2] Rename user data parameters to user_data




commit da7a31a052614edd2cc87518585ff371cbb0f204
Author: TestingPlant <49836-TestingPlant users noreply gitlab gnome org>
Date:   Sat May 21 21:16:24 2022 +0000

    Rename user data parameters to user_data
    
    The user data parameters in callbacks need to be named user_data to
    generate correct closure attributes in the introspection data. This
    updates parameters missed in GNOME/glib!2633.

 gio/giotypes.h     | 4 ++--
 glib/ghook.c       | 6 +++---
 glib/ghook.h       | 6 +++---
 glib/giochannel.c  | 2 +-
 glib/giochannel.h  | 2 +-
 glib/gnode.c       | 4 ++--
 glib/gnode.h       | 4 ++--
 glib/gsequence.c   | 2 +-
 glib/gsequence.h   | 2 +-
 glib/gthread.c     | 2 +-
 glib/gthread.h     | 2 +-
 glib/gtree.c       | 2 +-
 glib/gtree.h       | 2 +-
 glib/gtypes.h      | 4 ++--
 gobject/gclosure.h | 4 ++--
 gobject/gsignal.h  | 8 ++++----
 16 files changed, 28 insertions(+), 28 deletions(-)
---
diff --git a/gio/giotypes.h b/gio/giotypes.h
index 3711286aec..f69766a38b 100644
--- a/gio/giotypes.h
+++ b/gio/giotypes.h
@@ -300,7 +300,7 @@ typedef void (*GFileProgressCallback) (goffset current_num_bytes,
  * GFileReadMoreCallback:
  * @file_contents: the data as currently read.
  * @file_size: the size of the data currently read.
- * @callback_data: (closure): data passed to the callback.
+ * @user_data: data passed to the callback.
  *
  * When loading the partial contents of a file with g_file_load_partial_contents_async(),
  * it may become necessary to determine if any more data from the file should be loaded.
@@ -311,7 +311,7 @@ typedef void (*GFileProgressCallback) (goffset current_num_bytes,
  **/
 typedef gboolean (* GFileReadMoreCallback) (const char *file_contents,
                                             goffset file_size,
-                                            gpointer callback_data);
+                                            gpointer user_data);
 
 /**
  * GFileMeasureProgressCallback:
diff --git a/glib/ghook.c b/glib/ghook.c
index 3db220187e..6ef89733d2 100644
--- a/glib/ghook.c
+++ b/glib/ghook.c
@@ -584,7 +584,7 @@ g_hook_list_invoke_check (GHookList *hook_list,
 /**
  * GHookCheckMarshaller:
  * @hook: a #GHook
- * @marshal_data: user data
+ * @user_data: user data
  *
  * Defines the type of function used by g_hook_list_marshal_check().
  *
@@ -636,7 +636,7 @@ g_hook_list_marshal_check (GHookList               *hook_list,
 /**
  * GHookMarshaller:
  * @hook: a #GHook
- * @marshal_data: user data
+ * @user_data: user data
  *
  * Defines the type of function used by g_hook_list_marshal().
  */
@@ -793,7 +793,7 @@ g_hook_get (GHookList *hook_list,
 /**
  * GHookFindFunc:
  * @hook: a #GHook
- * @data: user data passed to g_hook_find_func()
+ * @user_data: user data passed to g_hook_find_func()
  *
  * Defines the type of the function passed to g_hook_find().
  *
diff --git a/glib/ghook.h b/glib/ghook.h
index 1bd858219e..203bc364ec 100644
--- a/glib/ghook.h
+++ b/glib/ghook.h
@@ -43,11 +43,11 @@ typedef struct _GHookList   GHookList;
 typedef gint           (*GHookCompareFunc)     (GHook          *new_hook,
                                                 GHook          *sibling);
 typedef gboolean       (*GHookFindFunc)        (GHook          *hook,
-                                                gpointer        data);
+                                                gpointer        user_data);
 typedef void           (*GHookMarshaller)      (GHook          *hook,
-                                                gpointer        marshal_data);
+                                                gpointer        user_data);
 typedef gboolean       (*GHookCheckMarshaller) (GHook          *hook,
-                                                gpointer        marshal_data);
+                                                gpointer        user_data);
 typedef void           (*GHookFunc)            (gpointer        data);
 typedef gboolean       (*GHookCheckFunc)       (gpointer        data);
 typedef void           (*GHookFinalizeFunc)    (GHookList      *hook_list,
diff --git a/glib/giochannel.c b/glib/giochannel.c
index 6c72667200..6fec45f66d 100644
--- a/glib/giochannel.c
+++ b/glib/giochannel.c
@@ -679,7 +679,7 @@ g_io_add_watch_full (GIOChannel    *channel,
  * GIOFunc:
  * @source: the #GIOChannel event source
  * @condition: the condition which has been satisfied
- * @data: user data set in g_io_add_watch() or g_io_add_watch_full()
+ * @user_data: user data set in g_io_add_watch() or g_io_add_watch_full()
  *
  * Specifies the type of function passed to g_io_add_watch() or
  * g_io_add_watch_full(), which is called when the requested condition
diff --git a/glib/giochannel.h b/glib/giochannel.h
index f6624b9939..5a13449d58 100644
--- a/glib/giochannel.h
+++ b/glib/giochannel.h
@@ -129,7 +129,7 @@ struct _GIOChannel
 
 typedef gboolean (*GIOFunc) (GIOChannel   *source,
                             GIOCondition  condition,
-                            gpointer      data);
+                            gpointer      user_data);
 struct _GIOFuncs
 {
   GIOStatus (*io_read)           (GIOChannel   *channel, 
diff --git a/glib/gnode.c b/glib/gnode.c
index b9a68c2f6f..a9988ebd8d 100644
--- a/glib/gnode.c
+++ b/glib/gnode.c
@@ -868,7 +868,7 @@ g_node_depth_traverse_level (GNode             *node,
 /**
  * GNodeTraverseFunc:
  * @node: a #GNode.
- * @data: user data passed to g_node_traverse().
+ * @user_data: user data passed to g_node_traverse().
  *
  * Specifies the type of function passed to g_node_traverse(). The
  * function is called with each of the nodes visited, together with the
@@ -1245,7 +1245,7 @@ g_node_last_sibling (GNode *node)
 /**
  * GNodeForeachFunc:
  * @node: a #GNode.
- * @data: user data passed to g_node_children_foreach().
+ * @user_data: user data passed to g_node_children_foreach().
  *
  * Specifies the type of function passed to g_node_children_foreach().
  * The function is called with each child node, together with the user
diff --git a/glib/gnode.h b/glib/gnode.h
index 94ab99621d..b3f89f02a5 100644
--- a/glib/gnode.h
+++ b/glib/gnode.h
@@ -58,9 +58,9 @@ typedef enum
 } GTraverseType;
 
 typedef gboolean       (*GNodeTraverseFunc)    (GNode         *node,
-                                                gpointer       data);
+                                                gpointer       user_data);
 typedef void           (*GNodeForeachFunc)     (GNode         *node,
-                                                gpointer       data);
+                                                gpointer       user_data);
 
 /* N-way tree implementation
  */
diff --git a/glib/gsequence.c b/glib/gsequence.c
index ead827d466..5c068f5ca5 100644
--- a/glib/gsequence.c
+++ b/glib/gsequence.c
@@ -85,7 +85,7 @@
  * GSequenceIterCompareFunc:
  * @a: a #GSequenceIter
  * @b: a #GSequenceIter
- * @data: user data
+ * @user_data: user data
  *
  * A #GSequenceIterCompareFunc is a function used to compare iterators.
  * It must return zero if the iterators compare equal, a negative value
diff --git a/glib/gsequence.h b/glib/gsequence.h
index c1b3404935..464fe80fbb 100644
--- a/glib/gsequence.h
+++ b/glib/gsequence.h
@@ -34,7 +34,7 @@ typedef struct _GSequenceNode  GSequenceIter;
 
 typedef gint (* GSequenceIterCompareFunc) (GSequenceIter *a,
                                            GSequenceIter *b,
-                                           gpointer       data);
+                                           gpointer       user_data);
 
 
 /* GSequence */
diff --git a/glib/gthread.c b/glib/gthread.c
index 8b3a9ced1e..0b03e64082 100644
--- a/glib/gthread.c
+++ b/glib/gthread.c
@@ -474,7 +474,7 @@
 
 /**
  * GThreadFunc:
- * @data: data passed to the thread
+ * @user_data: data passed to the thread
  *
  * Specifies the type of the @func functions passed to g_thread_new()
  * or g_thread_try_new().
diff --git a/glib/gthread.h b/glib/gthread.h
index e96632b91f..5a8fc5fb11 100644
--- a/glib/gthread.h
+++ b/glib/gthread.h
@@ -46,7 +46,7 @@ typedef enum
   G_THREAD_ERROR_AGAIN /* Resource temporarily unavailable */
 } GThreadError;
 
-typedef gpointer (*GThreadFunc) (gpointer data);
+typedef gpointer (*GThreadFunc) (gpointer user_data);
 
 typedef struct _GThread         GThread;
 
diff --git a/glib/gtree.c b/glib/gtree.c
index bbd609e5b9..df765b6792 100644
--- a/glib/gtree.c
+++ b/glib/gtree.c
@@ -1197,7 +1197,7 @@ g_tree_foreach_node (GTree             *tree,
  * GTraverseFunc:
  * @key: a key of a #GTree node
  * @value: the value corresponding to the key
- * @data: user data passed to g_tree_traverse()
+ * @user_data: user data passed to g_tree_traverse()
  *
  * Specifies the type of function passed to g_tree_traverse(). It is
  * passed the key and value of each node, together with the @user_data
diff --git a/glib/gtree.h b/glib/gtree.h
index 27c6f29a58..baff685265 100644
--- a/glib/gtree.h
+++ b/glib/gtree.h
@@ -50,7 +50,7 @@ typedef struct _GTreeNode GTreeNode;
 
 typedef gboolean (*GTraverseFunc) (gpointer  key,
                                    gpointer  value,
-                                   gpointer  data);
+                                   gpointer  user_data);
 
 /**
  * GTraverseNodeFunc:
diff --git a/glib/gtypes.h b/glib/gtypes.h
index 3ea840149a..8ef1909616 100644
--- a/glib/gtypes.h
+++ b/glib/gtypes.h
@@ -144,7 +144,7 @@ typedef void            (*GHFunc)               (gpointer       key,
 /**
  * GCopyFunc:
  * @src: (not nullable): A pointer to the data which should be copied
- * @data: Additional data
+ * @user_data: Additional data
  *
  * A function of this signature is used to copy the node data
  * when doing a deep-copy of a tree.
@@ -154,7 +154,7 @@ typedef void            (*GHFunc)               (gpointer       key,
  * Since: 2.4
  */
 typedef gpointer       (*GCopyFunc)            (gconstpointer  src,
-                                                 gpointer       data);
+                                                 gpointer       user_data);
 /**
  * GFreeFunc:
  * @data: a data pointer
diff --git a/gobject/gclosure.h b/gobject/gclosure.h
index f30499e860..98ec49c5a9 100644
--- a/gobject/gclosure.h
+++ b/gobject/gclosure.h
@@ -110,7 +110,7 @@ typedef void  (*GClosureNotify)             (gpointer        data,
  *  callback of @closure
  * @invocation_hint: (nullable): the invocation hint given as the
  *  last argument to g_closure_invoke()
- * @marshal_data: (nullable): additional data specified when
+ * @user_data: (nullable): additional data specified when
  *  registering the marshaller, see g_closure_set_marshal() and
  *  g_closure_set_meta_marshal()
  * 
@@ -121,7 +121,7 @@ typedef void  (*GClosureMarshal)    (GClosure       *closure,
                                         guint           n_param_values,
                                         const GValue   *param_values,
                                         gpointer        invocation_hint,
-                                        gpointer        marshal_data);
+                                        gpointer        user_data);
 
 /**
  * GVaClosureMarshal:
diff --git a/gobject/gsignal.h b/gobject/gsignal.h
index 04f1344343..7b3974a8c4 100644
--- a/gobject/gsignal.h
+++ b/gobject/gsignal.h
@@ -58,7 +58,7 @@ typedef GVaClosureMarshal              GSignalCVaMarshaller;
  *  the instance on which the signal was emitted.
  * @param_values: (array length=n_param_values): the instance on which
  *  the signal was emitted, followed by the parameters of the emission.
- * @data: user data associated with the hook.
+ * @user_data: user data associated with the hook.
  * 
  * A simple function pointer to get invoked when the signal is emitted.
  *
@@ -73,14 +73,14 @@ typedef GVaClosureMarshal            GSignalCVaMarshaller;
 typedef gboolean (*GSignalEmissionHook) (GSignalInvocationHint *ihint,
                                         guint                  n_param_values,
                                         const GValue          *param_values,
-                                        gpointer               data);
+                                        gpointer               user_data);
 /**
  * GSignalAccumulator:
  * @ihint: Signal invocation hint, see #GSignalInvocationHint.
  * @return_accu: Accumulator to collect callback return values in, this
  *  is the return value of the current signal emission.
  * @handler_return: A #GValue holding the return value of the signal handler.
- * @data: Callback data that was specified when creating the signal.
+ * @user_data: Callback data that was specified when creating the signal.
  * 
  * The signal accumulator is a special callback function that can be used
  * to collect return values of the various callbacks that are called
@@ -101,7 +101,7 @@ typedef gboolean (*GSignalEmissionHook) (GSignalInvocationHint *ihint,
 typedef gboolean (*GSignalAccumulator) (GSignalInvocationHint *ihint,
                                         GValue                *return_accu,
                                         const GValue          *handler_return,
-                                        gpointer               data);
+                                        gpointer               user_data);
 
 
 /* --- run, match and connect types --- */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]