Add (allow-none) annotation for GValue setters.

Assorted g_value_set_xxx() and g_value_take_xxx() functions actually
allow NULL in source parameter.
This commit is contained in:
Pavel Holejsovsky 2011-08-17 07:37:36 +02:00
parent e3219c8425
commit d4c5e3b156
5 changed files with 13 additions and 13 deletions

View File

@ -463,7 +463,7 @@ value_set_boxed_internal (GValue *value,
/** /**
* g_value_set_boxed: * g_value_set_boxed:
* @value: a valid #GValue of %G_TYPE_BOXED derived type * @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. * 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: * g_value_set_static_boxed:
* @value: a valid #GValue of %G_TYPE_BOXED derived type * @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. * 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 * 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: * g_value_set_boxed_take_ownership:
* @value: a valid #GValue of %G_TYPE_BOXED derived type * @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. * 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: * g_value_take_boxed:
* @value: a valid #GValue of %G_TYPE_BOXED derived type * @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 * 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; * and takes over the ownership of the callers reference to @v_boxed;

View File

@ -3110,7 +3110,7 @@ g_value_object_lcopy_value (const GValue *value,
/** /**
* g_value_set_object: * g_value_set_object:
* @value: a valid #GValue of %G_TYPE_OBJECT derived type * @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. * 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) * g_value_set_object_take_ownership: (skip)
* @value: a valid #GValue of %G_TYPE_OBJECT derived type * @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. * 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) * g_value_take_object: (skip)
* @value: a valid #GValue of %G_TYPE_OBJECT derived type * @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 * 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; * and takes over the ownership of the callers reference to @v_object;

View File

@ -1417,7 +1417,7 @@ g_param_type_register_static (const gchar *name,
/** /**
* g_value_set_param: * g_value_set_param:
* @value: a valid #GValue of type %G_TYPE_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. * 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) * g_value_set_param_take_ownership: (skip)
* @value: a valid #GValue of type %G_TYPE_PARAM * @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. * 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) * g_value_take_param: (skip)
* @value: a valid #GValue of type %G_TYPE_PARAM * @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 * Sets the contents of a %G_TYPE_PARAM #GValue to @param and takes
* over the ownership of the callers reference to @param; the caller * over the ownership of the callers reference to @param; the caller

View File

@ -326,7 +326,7 @@ g_value_peek_pointer (const GValue *value)
/** /**
* g_value_set_instance: * g_value_set_instance:
* @value: An initialized #GValue structure. * @value: An initialized #GValue structure.
* @instance: the instance * @instance: (allow-none): the instance
* *
* Sets @value from an instantiatable type via the * Sets @value from an instantiatable type via the
* value_table's collect_value() function. * value_table's collect_value() function.

View File

@ -1172,7 +1172,7 @@ g_value_get_gtype (const GValue *value)
/** /**
* g_value_set_variant: * g_value_set_variant:
* @value: a valid #GValue of type %G_TYPE_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. * Set the contents of a variant #GValue to @variant.
* If the variant is floating, it is consumed. * If the variant is floating, it is consumed.
@ -1201,7 +1201,7 @@ g_value_set_variant (GValue *value,
/** /**
* g_value_take_variant: * g_value_take_variant:
* @value: a valid #GValue of type %G_TYPE_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 * Set the contents of a variant #GValue to @variant, and takes over
* the ownership of the caller's reference to @variant; * the ownership of the caller's reference to @variant;