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

@@ -97,16 +97,16 @@ typedef void (*GClosureNotify) (gpointer data,
/**
* GClosureMarshal:
* @closure: the #GClosure to which the marshaller belongs
* @return_value: (allow-none): a #GValue to store the return
* @return_value: (nullable): a #GValue to store the return
* value. May be %NULL if the callback of @closure doesn't return a
* value.
* @n_param_values: the length of the @param_values array
* @param_values: (array length=n_param_values): an array of
* #GValues holding the arguments on which to invoke the
* callback of @closure
* @invocation_hint: (allow-none): the invocation hint given as the
* @invocation_hint: (nullable): the invocation hint given as the
* last argument to g_closure_invoke()
* @marshal_data: (allow-none): additional data specified when
* @marshal_data: (nullable): additional data specified when
* registering the marshaller, see g_closure_set_marshal() and
* g_closure_set_meta_marshal()
*
@@ -122,13 +122,13 @@ typedef void (*GClosureMarshal) (GClosure *closure,
/**
* GVaClosureMarshal:
* @closure: the #GClosure to which the marshaller belongs
* @return_value: (allow-none): a #GValue to store the return
* @return_value: (nullable): a #GValue to store the return
* value. May be %NULL if the callback of @closure doesn't return a
* value.
* @instance: (type GObject.TypeInstance): the instance on which the closure is
* invoked.
* @args: va_list of arguments to be passed to the closure.
* @marshal_data: (allow-none): additional data specified when
* @marshal_data: (nullable): additional data specified when
* registering the marshaller, see g_closure_set_marshal() and
* g_closure_set_meta_marshal()
* @n_params: the length of the @param_types array