[glib] Add GI annotations to GValue and GValueArray.
- From: Pavel Holejsovsky <pholejs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Add GI annotations to GValue and GValueArray.
- Date: Sun, 19 Dec 2010 21:20:54 +0000 (UTC)
commit ea577d60d451bc7102695046fb1c3f80fb3e1769
Author: Pavel Holejsovsky <pholejs src gnome org>
Date: Sun Dec 19 10:39:36 2010 +0100
Add GI annotations to GValue and GValueArray.
gobject/gboxed.c | 4 ++--
gobject/gobject.c | 6 +++---
gobject/gparam.c | 4 ++--
gobject/gvalue.c | 13 ++++++-------
gobject/gvaluearray.c | 29 +++++++++++++++--------------
gobject/gvaluetypes.c | 2 +-
6 files changed, 29 insertions(+), 29 deletions(-)
---
diff --git a/gobject/gboxed.c b/gobject/gboxed.c
index e6f2274..06b3cf2 100644
--- a/gobject/gboxed.c
+++ b/gobject/gboxed.c
@@ -402,7 +402,7 @@ g_boxed_free (GType boxed_type,
*
* Get the contents of a %G_TYPE_BOXED derived #GValue.
*
- * Returns: boxed contents of @value
+ * Returns: (transfer none): boxed contents of @value
*/
gpointer
g_value_get_boxed (const GValue *value)
@@ -414,7 +414,7 @@ g_value_get_boxed (const GValue *value)
}
/**
- * g_value_dup_boxed:
+ * g_value_dup_boxed: (skip)
* @value: a valid #GValue of %G_TYPE_BOXED derived type
*
* Get the contents of a %G_TYPE_BOXED derived #GValue. Upon getting,
diff --git a/gobject/gobject.c b/gobject/gobject.c
index f1fa54d..1bf32b4 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -3181,7 +3181,7 @@ g_value_take_object (GValue *value,
*
* Get the contents of a %G_TYPE_OBJECT derived #GValue.
*
- * Returns: object contents of @value
+ * Returns: (type GObject.Object) (transfer none): object contents of @value
*/
gpointer
g_value_get_object (const GValue *value)
@@ -3198,8 +3198,8 @@ g_value_get_object (const GValue *value)
* Get the contents of a %G_TYPE_OBJECT derived #GValue, increasing
* its reference count.
*
- * Returns: object content of @value, should be unreferenced when no
- * longer needed.
+ * Returns: (type GObject.Object) (transfer full): object content of
+ * @value, should be unreferenced when no longer needed.
*/
gpointer
g_value_dup_object (const GValue *value)
diff --git a/gobject/gparam.c b/gobject/gparam.c
index f91e587..b8ba5bb 100644
--- a/gobject/gparam.c
+++ b/gobject/gparam.c
@@ -1474,7 +1474,7 @@ g_value_take_param (GValue *value,
*
* Get the contents of a %G_TYPE_PARAM #GValue.
*
- * Returns: #GParamSpec content of @value
+ * Returns: (transfer none): #GParamSpec content of @value
*/
GParamSpec*
g_value_get_param (const GValue *value)
@@ -1485,7 +1485,7 @@ g_value_get_param (const GValue *value)
}
/**
- * g_value_dup_param:
+ * g_value_dup_param: (skip)
* @value: a valid #GValue whose type is derived from %G_TYPE_PARAM
*
* Get the contents of a %G_TYPE_PARAM #GValue, increasing its
diff --git a/gobject/gvalue.c b/gobject/gvalue.c
index 9247d4c..573969c 100644
--- a/gobject/gvalue.c
+++ b/gobject/gvalue.c
@@ -159,7 +159,7 @@ value_meminit (GValue *value,
*
* Initializes @value with the default value of @type.
*
- * Returns: the #GValue structure that has been passed in
+ * Returns: (transfer none): the #GValue structure that has been passed in
*/
GValue*
g_value_init (GValue *value,
@@ -301,11 +301,10 @@ g_value_fits_pointer (const GValue *value)
* g_value_peek_pointer:
* @value: An initialized #GValue structure.
*
- * Return the value contents as pointer. This function asserts that
- * g_value_fits_pointer() returned %TRUE for the passed in value.
- * This is an internal function introduced mainly for C marshallers.
- *
- * Returns: %TRUE if @value will fit inside a pointer value.
+ * Returns: (transfer none): the value contents as pointer. This
+ * function asserts that g_value_fits_pointer() returned %TRUE for the
+ * passed in value. This is an internal function introduced mainly
+ * for C marshallers.
*/
gpointer
g_value_peek_pointer (const GValue *value)
@@ -424,7 +423,7 @@ transform_entries_cmp (gconstpointer bsearch_node1,
}
/**
- * g_value_register_transform_func:
+ * g_value_register_transform_func: (skip)
* @src_type: Source type.
* @dest_type: Target type.
* @transform_func: a function which transforms values of type @src_type
diff --git a/gobject/gvaluearray.c b/gobject/gvaluearray.c
index 3bc6787..e2a752e 100644
--- a/gobject/gvaluearray.c
+++ b/gobject/gvaluearray.c
@@ -58,7 +58,7 @@
*
* Return a pointer to the value at @index_ containd in @value_array.
*
- * Returns: pointer to a value at @index_ in @value_array
+ * Returns: (transfer none): pointer to a value at @index_ in @value_array
*/
GValue*
g_value_array_get_nth (GValueArray *value_array,
@@ -158,7 +158,7 @@ g_value_array_free (GValueArray *value_array)
* Construct an exact copy of a #GValueArray by duplicating all its
* contents.
*
- * Returns: Newly allocated copy of #GValueArray
+ * Returns: (transfer full): Newly allocated copy of #GValueArray
*/
GValueArray*
g_value_array_copy (const GValueArray *value_array)
@@ -187,13 +187,13 @@ g_value_array_copy (const GValueArray *value_array)
/**
* g_value_array_prepend:
* @value_array: #GValueArray to add an element to
- * @value: #GValue to copy into #GValueArray, or %NULL
+ * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
*
* Insert a copy of @value as first element of @value_array. If @value is
* %NULL, an uninitialized value is prepended.
*
*
- * Returns: the #GValueArray passed in as @value_array
+ * Returns: (transfer none): the #GValueArray passed in as @value_array
*/
GValueArray*
g_value_array_prepend (GValueArray *value_array,
@@ -207,12 +207,12 @@ g_value_array_prepend (GValueArray *value_array,
/**
* g_value_array_append:
* @value_array: #GValueArray to add an element to
- * @value: #GValue to copy into #GValueArray, or %NULL
+ * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
*
* Insert a copy of @value as last element of @value_array. If @value is
* %NULL, an uninitialized value is appended.
*
- * Returns: the #GValueArray passed in as @value_array
+ * Returns: (transfer none): the #GValueArray passed in as @value_array
*/
GValueArray*
g_value_array_append (GValueArray *value_array,
@@ -227,12 +227,12 @@ g_value_array_append (GValueArray *value_array,
* g_value_array_insert:
* @value_array: #GValueArray to add an element to
* @index_: insertion position, must be <= value_array->n_values
- * @value: #GValue to copy into #GValueArray, or %NULL
+ * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
*
* Insert a copy of @value at specified position into @value_array. If @value
* is %NULL, an uninitialized value is inserted.
*
- * Returns: the #GValueArray passed in as @value_array
+ * Returns: (transfer none): the #GValueArray passed in as @value_array
*/
GValueArray*
g_value_array_insert (GValueArray *value_array,
@@ -265,7 +265,7 @@ g_value_array_insert (GValueArray *value_array,
*
* Remove the value at position @index_ from @value_array.
*
- * Returns: the #GValueArray passed in as @value_array
+ * Returns: (transfer none): the #GValueArray passed in as @value_array
*/
GValueArray*
g_value_array_remove (GValueArray *value_array,
@@ -290,14 +290,14 @@ g_value_array_remove (GValueArray *value_array,
/**
* g_value_array_sort:
* @value_array: #GValueArray to sort
- * @compare_func: function to compare elements
+ * @compare_func: (scope call): function to compare elements
*
* Sort @value_array using @compare_func to compare the elements accoring to
* the semantics of #GCompareFunc.
*
* The current implementation uses Quick-Sort as sorting algorithm.
*
- * Returns: the #GValueArray passed in as @value_array
+ * Returns: (transfer none): the #GValueArray passed in as @value_array
*/
GValueArray*
g_value_array_sort (GValueArray *value_array,
@@ -316,15 +316,16 @@ g_value_array_sort (GValueArray *value_array,
/**
* g_value_array_sort_with_data:
* @value_array: #GValueArray to sort
- * @compare_func: function to compare elements
- * @user_data: extra data argument provided for @compare_func
+ * @compare_func: (scope call): function to compare elements
+ * @user_data: (closure): extra data argument provided for @compare_func
*
* Sort @value_array using @compare_func to compare the elements accoring
* to the semantics of #GCompareDataFunc.
*
* The current implementation uses Quick-Sort as sorting algorithm.
*
- * Returns: the #GValueArray passed in as @value_array
+ * Rename to: g_value_array_sort
+ * Returns: (transfer none): the #GValueArray passed in as @value_array
*/
GValueArray*
g_value_array_sort_with_data (GValueArray *value_array,
diff --git a/gobject/gvaluetypes.c b/gobject/gvaluetypes.c
index aa22b2d..78c7266 100644
--- a/gobject/gvaluetypes.c
+++ b/gobject/gvaluetypes.c
@@ -1119,7 +1119,7 @@ g_value_set_pointer (GValue *value,
*
* Get the contents of a pointer #GValue.
*
- * Returns: pointer contents of @value
+ * Returns: (transfer none): pointer contents of @value
*/
gpointer
g_value_get_pointer (const GValue *value)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]