introspection: use (nullable) or (optional) instead of (allow-none)

If we have an input parameter (or return value) we need to use (nullable).
However, if it is an (inout) or (out) parameter, (optional) is sufficient.

It looks like (nullable) could be used for everything according to the
Annotation documentation, but (optional) is more specific.
This commit is contained in:
Christian Hergert
2016-10-28 18:29:02 -07:00
parent a4012abbdf
commit 18a33f72db
151 changed files with 986 additions and 987 deletions

View File

@@ -1430,7 +1430,7 @@ g_param_type_register_static (const gchar *name,
/**
* g_value_set_param:
* @value: a valid #GValue of type %G_TYPE_PARAM
* @param: (allow-none): the #GParamSpec to be set
* @param: (nullable): the #GParamSpec to be set
*
* Set the contents of a %G_TYPE_PARAM #GValue to @param.
*/
@@ -1452,7 +1452,7 @@ g_value_set_param (GValue *value,
/**
* g_value_set_param_take_ownership: (skip)
* @value: a valid #GValue of type %G_TYPE_PARAM
* @param: (allow-none): the #GParamSpec to be set
* @param: (nullable): the #GParamSpec to be set
*
* This is an internal function introduced mainly for C marshallers.
*
@@ -1468,7 +1468,7 @@ g_value_set_param_take_ownership (GValue *value,
/**
* g_value_take_param: (skip)
* @value: a valid #GValue of type %G_TYPE_PARAM
* @param: (allow-none): the #GParamSpec to be set
* @param: (nullable): 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