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

@@ -1632,7 +1632,7 @@ g_type_interface_add_prerequisite (GType interface_type,
/**
* g_type_interface_prerequisites:
* @interface_type: an interface type
* @n_prerequisites: (out) (allow-none): location to return the number
* @n_prerequisites: (out) (optional): location to return the number
* of prerequisites, or %NULL
*
* Returns the prerequisites of an interfaces type.
@@ -3528,7 +3528,7 @@ g_type_is_a (GType type,
/**
* g_type_children:
* @type: the parent type
* @n_children: (out) (allow-none): location to store the length of
* @n_children: (out) (optional): location to store the length of
* the returned array, or %NULL
*
* Return a newly allocated and 0-terminated array of type IDs, listing
@@ -3571,7 +3571,7 @@ g_type_children (GType type,
/**
* g_type_interfaces:
* @type: the type to list interface types for
* @n_interfaces: (out) (allow-none): location to store the length of
* @n_interfaces: (out) (optional): location to store the length of
* the returned array, or %NULL
*
* Return a newly allocated and 0-terminated array of type IDs, listing