mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-31 21:34:12 +02:00
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:
30
gio/gmount.c
30
gio/gmount.c
@@ -359,8 +359,8 @@ g_mount_can_eject (GMount *mount)
|
||||
* g_mount_unmount:
|
||||
* @mount: a #GMount.
|
||||
* @flags: flags affecting the operation
|
||||
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
|
||||
* @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
|
||||
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
|
||||
* @callback: (nullable): a #GAsyncReadyCallback, or %NULL.
|
||||
* @user_data: user data passed to @callback.
|
||||
*
|
||||
* Unmounts a mount. This is an asynchronous operation, and is
|
||||
@@ -435,8 +435,8 @@ g_mount_unmount_finish (GMount *mount,
|
||||
* g_mount_eject:
|
||||
* @mount: a #GMount.
|
||||
* @flags: flags affecting the unmount if required for eject
|
||||
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
|
||||
* @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
|
||||
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
|
||||
* @callback: (nullable): a #GAsyncReadyCallback, or %NULL.
|
||||
* @user_data: user data passed to @callback.
|
||||
*
|
||||
* Ejects a mount. This is an asynchronous operation, and is
|
||||
@@ -510,10 +510,10 @@ g_mount_eject_finish (GMount *mount,
|
||||
* g_mount_unmount_with_operation:
|
||||
* @mount: a #GMount.
|
||||
* @flags: flags affecting the operation
|
||||
* @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid
|
||||
* @mount_operation: (nullable): a #GMountOperation or %NULL to avoid
|
||||
* user interaction.
|
||||
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
|
||||
* @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
|
||||
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
|
||||
* @callback: (nullable): a #GAsyncReadyCallback, or %NULL.
|
||||
* @user_data: user data passed to @callback.
|
||||
*
|
||||
* Unmounts a mount. This is an asynchronous operation, and is
|
||||
@@ -595,10 +595,10 @@ g_mount_unmount_with_operation_finish (GMount *mount,
|
||||
* g_mount_eject_with_operation:
|
||||
* @mount: a #GMount.
|
||||
* @flags: flags affecting the unmount if required for eject
|
||||
* @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid
|
||||
* @mount_operation: (nullable): a #GMountOperation or %NULL to avoid
|
||||
* user interaction.
|
||||
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
|
||||
* @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
|
||||
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
|
||||
* @callback: (nullable): a #GAsyncReadyCallback, or %NULL.
|
||||
* @user_data: user data passed to @callback.
|
||||
*
|
||||
* Ejects a mount. This is an asynchronous operation, and is
|
||||
@@ -679,10 +679,10 @@ g_mount_eject_with_operation_finish (GMount *mount,
|
||||
* g_mount_remount:
|
||||
* @mount: a #GMount.
|
||||
* @flags: flags affecting the operation
|
||||
* @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid
|
||||
* @mount_operation: (nullable): a #GMountOperation or %NULL to avoid
|
||||
* user interaction.
|
||||
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
|
||||
* @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
|
||||
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
|
||||
* @callback: (nullable): a #GAsyncReadyCallback, or %NULL.
|
||||
* @user_data: user data passed to @callback.
|
||||
*
|
||||
* Remounts a mount. This is an asynchronous operation, and is
|
||||
@@ -760,7 +760,7 @@ g_mount_remount_finish (GMount *mount,
|
||||
* @mount: a #GMount
|
||||
* @force_rescan: Whether to force a rescan of the content.
|
||||
* Otherwise a cached result will be used if available
|
||||
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
|
||||
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore
|
||||
* @callback: a #GAsyncReadyCallback
|
||||
* @user_data: user data passed to @callback
|
||||
*
|
||||
@@ -848,7 +848,7 @@ g_mount_guess_content_type_finish (GMount *mount,
|
||||
* @mount: a #GMount
|
||||
* @force_rescan: Whether to force a rescan of the content.
|
||||
* Otherwise a cached result will be used if available
|
||||
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
|
||||
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore
|
||||
* @error: a #GError location to store the error occurring, or %NULL to
|
||||
* ignore
|
||||
*
|
||||
|
Reference in New Issue
Block a user