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

@@ -176,7 +176,7 @@ g_file_enumerator_init (GFileEnumerator *enumerator)
/**
* g_file_enumerator_next_file:
* @enumerator: a #GFileEnumerator.
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @error: location to store the error occurring, or %NULL to ignore
*
* Returns information for the next file in the enumerated object.
@@ -245,7 +245,7 @@ g_file_enumerator_next_file (GFileEnumerator *enumerator,
/**
* g_file_enumerator_close:
* @enumerator: a #GFileEnumerator.
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @error: location to store the error occurring, or %NULL to ignore
*
* Releases all resources used by this enumerator, making the
@@ -310,8 +310,8 @@ next_async_callback_wrapper (GObject *source_object,
* g_file_enumerator_next_files_async:
* @enumerator: a #GFileEnumerator.
* @num_files: the number of file info objects to request
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
*
@@ -437,7 +437,7 @@ close_async_callback_wrapper (GObject *source_object,
* g_file_enumerator_close_async:
* @enumerator: a #GFileEnumerator.
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
*
@@ -576,8 +576,8 @@ g_file_enumerator_set_pending (GFileEnumerator *enumerator,
/**
* g_file_enumerator_iterate:
* @direnum: an open #GFileEnumerator
* @out_info: (out) (transfer none) (allow-none): Output location for the next #GFileInfo, or %NULL
* @out_child: (out) (transfer none) (allow-none): Output location for the next #GFile, or %NULL
* @out_info: (out) (transfer none) (optional): Output location for the next #GFileInfo, or %NULL
* @out_child: (out) (transfer none) (optional): Output location for the next #GFile, or %NULL
* @cancellable: a #GCancellable
* @error: a #GError
*