[glib] Add (allow-none) annotation for GValue setters.
- From: Pavel Holejsovsky <pholejs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Add (allow-none) annotation for GValue setters.
- Date: Wed, 17 Aug 2011 10:59:42 +0000 (UTC)
commit d4c5e3b1566616bf65b2d92b625c712dab961052
Author: Pavel Holejsovsky <pholejs src gnome org>
Date: Wed Aug 17 07:37:36 2011 +0200
Add (allow-none) annotation for GValue setters.
Assorted g_value_set_xxx() and g_value_take_xxx() functions actually
allow NULL in source parameter.
gobject/gboxed.c | 8 ++++----
gobject/gobject.c | 6 +++---
gobject/gparam.c | 6 +++---
gobject/gvalue.c | 2 +-
gobject/gvaluetypes.c | 4 ++--
5 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/gobject/gboxed.c b/gobject/gboxed.c
index 02da78a..f61cc01 100644
--- a/gobject/gboxed.c
+++ b/gobject/gboxed.c
@@ -463,7 +463,7 @@ value_set_boxed_internal (GValue *value,
/**
* g_value_set_boxed:
* @value: a valid #GValue of %G_TYPE_BOXED derived type
- * @v_boxed: boxed value to be set
+ * @v_boxed: (allow-none): boxed value to be set
*
* Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed.
*/
@@ -480,7 +480,7 @@ g_value_set_boxed (GValue *value,
/**
* g_value_set_static_boxed:
* @value: a valid #GValue of %G_TYPE_BOXED derived type
- * @v_boxed: static boxed value to be set
+ * @v_boxed: (allow-none): static boxed value to be set
*
* Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed.
* The boxed value is assumed to be static, and is thus not duplicated
@@ -499,7 +499,7 @@ g_value_set_static_boxed (GValue *value,
/**
* g_value_set_boxed_take_ownership:
* @value: a valid #GValue of %G_TYPE_BOXED derived type
- * @v_boxed: duplicated unowned boxed value to be set
+ * @v_boxed: (allow-none): duplicated unowned boxed value to be set
*
* This is an internal function introduced mainly for C marshallers.
*
@@ -515,7 +515,7 @@ g_value_set_boxed_take_ownership (GValue *value,
/**
* g_value_take_boxed:
* @value: a valid #GValue of %G_TYPE_BOXED derived type
- * @v_boxed: duplicated unowned boxed value to be set
+ * @v_boxed: (allow-none): duplicated unowned boxed value to be set
*
* Sets the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed
* and takes over the ownership of the callers reference to @v_boxed;
diff --git a/gobject/gobject.c b/gobject/gobject.c
index ca9c0a1..b88a276 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -3110,7 +3110,7 @@ g_value_object_lcopy_value (const GValue *value,
/**
* g_value_set_object:
* @value: a valid #GValue of %G_TYPE_OBJECT derived type
- * @v_object: (type GObject.Object): object value to be set
+ * @v_object: (type GObject.Object) (allow-none): object value to be set
*
* Set the contents of a %G_TYPE_OBJECT derived #GValue to @v_object.
*
@@ -3152,7 +3152,7 @@ g_value_set_object (GValue *value,
/**
* g_value_set_object_take_ownership: (skip)
* @value: a valid #GValue of %G_TYPE_OBJECT derived type
- * @v_object: object value to be set
+ * @v_object: (allow-none): object value to be set
*
* This is an internal function introduced mainly for C marshallers.
*
@@ -3168,7 +3168,7 @@ g_value_set_object_take_ownership (GValue *value,
/**
* g_value_take_object: (skip)
* @value: a valid #GValue of %G_TYPE_OBJECT derived type
- * @v_object: object value to be set
+ * @v_object: (allow-none): object value to be set
*
* Sets the contents of a %G_TYPE_OBJECT derived #GValue to @v_object
* and takes over the ownership of the callers reference to @v_object;
diff --git a/gobject/gparam.c b/gobject/gparam.c
index 656614e..b29d0fc 100644
--- a/gobject/gparam.c
+++ b/gobject/gparam.c
@@ -1417,7 +1417,7 @@ g_param_type_register_static (const gchar *name,
/**
* g_value_set_param:
* @value: a valid #GValue of type %G_TYPE_PARAM
- * @param: the #GParamSpec to be set
+ * @param: (allow-none): the #GParamSpec to be set
*
* Set the contents of a %G_TYPE_PARAM #GValue to @param.
*/
@@ -1439,7 +1439,7 @@ g_value_set_param (GValue *value,
/**
* g_value_set_param_take_ownership: (skip)
* @value: a valid #GValue of type %G_TYPE_PARAM
- * @param: the #GParamSpec to be set
+ * @param: (allow-none): the #GParamSpec to be set
*
* This is an internal function introduced mainly for C marshallers.
*
@@ -1455,7 +1455,7 @@ g_value_set_param_take_ownership (GValue *value,
/**
* g_value_take_param: (skip)
* @value: a valid #GValue of type %G_TYPE_PARAM
- * @param: the #GParamSpec to be set
+ * @param: (allow-none): the #GParamSpec to be set
*
* Sets the contents of a %G_TYPE_PARAM #GValue to @param and takes
* over the ownership of the callers reference to @param; the caller
diff --git a/gobject/gvalue.c b/gobject/gvalue.c
index bca9aa5..5fc7654 100644
--- a/gobject/gvalue.c
+++ b/gobject/gvalue.c
@@ -326,7 +326,7 @@ g_value_peek_pointer (const GValue *value)
/**
* g_value_set_instance:
* @value: An initialized #GValue structure.
- * @instance: the instance
+ * @instance: (allow-none): the instance
*
* Sets @value from an instantiatable type via the
* value_table's collect_value() function.
diff --git a/gobject/gvaluetypes.c b/gobject/gvaluetypes.c
index c870445..dd3fa85 100644
--- a/gobject/gvaluetypes.c
+++ b/gobject/gvaluetypes.c
@@ -1172,7 +1172,7 @@ g_value_get_gtype (const GValue *value)
/**
* g_value_set_variant:
* @value: a valid #GValue of type %G_TYPE_VARIANT
- * @variant: a #GVariant, or %NULL
+ * @variant: (allow-none): a #GVariant, or %NULL
*
* Set the contents of a variant #GValue to @variant.
* If the variant is floating, it is consumed.
@@ -1201,7 +1201,7 @@ g_value_set_variant (GValue *value,
/**
* g_value_take_variant:
* @value: a valid #GValue of type %G_TYPE_VARIANT
- * @variant: a #GVariant, or %NULL
+ * @variant: (allow-none): a #GVariant, or %NULL
*
* Set the contents of a variant #GValue to @variant, and takes over
* the ownership of the caller's reference to @variant;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]