[glib] gdataset: Annotate the closures
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gdataset: Annotate the closures
- Date: Mon, 11 Sep 2017 19:33:21 +0000 (UTC)
commit a3ba8ea7d31bab22a096b69a1274f44b90ebc66d
Author: Mikhail Zabaluev <mikhail zabaluev gmail com>
Date: Tue Oct 13 02:12:20 2015 +0300
gdataset: Annotate the closures
Annotate the closure parameters in GDataForeachFunc, GDuplicateFunc,
and the functions using them.
https://bugzilla.gnome.org/show_bug.cgi?id=756470
glib/gdataset.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/glib/gdataset.c b/glib/gdataset.c
index 7fca8db..5e23bcd 100644
--- a/glib/gdataset.c
+++ b/glib/gdataset.c
@@ -804,7 +804,8 @@ g_datalist_id_get_data (GData **datalist,
/**
* GDuplicateFunc:
* @data: the data to duplicate
- * @user_data: user data that was specified in g_datalist_id_dup_data()
+ * @user_data: (closure): user data that was specified in
+ * g_datalist_id_dup_data()
*
* The type of functions that are used to 'duplicate' an object.
* What this means depends on the context, it could just be
@@ -818,8 +819,8 @@ g_datalist_id_get_data (GData **datalist,
* g_datalist_id_dup_data:
* @datalist: location of a datalist
* @key_id: the #GQuark identifying a data element
- * @dup_func: (nullable): function to duplicate the old value
- * @user_data: (nullable): passed as user_data to @dup_func
+ * @dup_func: (nullable) (scope call): function to duplicate the old value
+ * @user_data: (closure): passed as user_data to @dup_func
*
* This is a variant of g_datalist_id_get_data() which
* returns a 'duplicate' of the value. @dup_func defines the
@@ -1049,7 +1050,7 @@ g_datalist_get_data (GData **datalist,
* GDataForeachFunc:
* @key_id: the #GQuark id to identifying the data element.
* @data: the data element.
- * @user_data: user data passed to g_dataset_foreach().
+ * @user_data: (closure): user data passed to g_dataset_foreach().
*
* Specifies the type of function passed to g_dataset_foreach(). It is
* called with each #GQuark id and associated data element, together
@@ -1059,8 +1060,8 @@ g_datalist_get_data (GData **datalist,
/**
* g_dataset_foreach:
* @dataset_location: (not nullable): the location identifying the dataset.
- * @func: the function to call for each data element.
- * @user_data: user data to pass to the function.
+ * @func: (scope call): the function to call for each data element.
+ * @user_data: (closure): user data to pass to the function.
*
* Calls the given function for each data element which is associated
* with the given location. Note that this function is NOT thread-safe.
@@ -1094,8 +1095,8 @@ g_dataset_foreach (gconstpointer dataset_location,
/**
* g_datalist_foreach:
* @datalist: a datalist.
- * @func: the function to call for each data element.
- * @user_data: user data to pass to the function.
+ * @func: (scope call): the function to call for each data element.
+ * @user_data: (closure): user data to pass to the function.
*
* Calls the given function for each data element of the datalist. The
* function is called with each data element's #GQuark id and data,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]