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

@@ -94,7 +94,7 @@ io_job_thread (GTask *task,
* g_io_scheduler_push_job:
* @job_func: a #GIOSchedulerJobFunc.
* @user_data: data to pass to @job_func
* @notify: (allow-none): a #GDestroyNotify for @user_data, or %NULL
* @notify: (nullable): a #GDestroyNotify for @user_data, or %NULL
* @io_priority: the [I/O priority][io-priority]
* of the request.
* @cancellable: optional #GCancellable object, %NULL to ignore.
@@ -226,7 +226,7 @@ mainloop_proxy_free (MainLoopProxy *proxy)
* @job: a #GIOSchedulerJob
* @func: a #GSourceFunc callback that will be called in the original thread
* @user_data: data to pass to @func
* @notify: (allow-none): a #GDestroyNotify for @user_data, or %NULL
* @notify: (nullable): a #GDestroyNotify for @user_data, or %NULL
*
* Used from an I/O job to send a callback to be run in the thread
* that the job was started from, waiting for the result (and thus
@@ -281,7 +281,7 @@ g_io_scheduler_job_send_to_mainloop (GIOSchedulerJob *job,
* @job: a #GIOSchedulerJob
* @func: a #GSourceFunc callback that will be called in the original thread
* @user_data: data to pass to @func
* @notify: (allow-none): a #GDestroyNotify for @user_data, or %NULL
* @notify: (nullable): a #GDestroyNotify for @user_data, or %NULL
*
* Used from an I/O job to send a callback to be run asynchronously in
* the thread that the job was started from. The callback will be run