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

@@ -78,7 +78,7 @@ G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GPermission, g_permission, G_TYPE_OBJECT)
/**
* g_permission_acquire:
* @permission: a #GPermission instance
* @cancellable: (allow-none): a #GCancellable, or %NULL
* @cancellable: (nullable): a #GCancellable, or %NULL
* @error: a pointer to a %NULL #GError, or %NULL
*
* Attempts to acquire the permission represented by @permission.
@@ -114,7 +114,7 @@ g_permission_acquire (GPermission *permission,
/**
* g_permission_acquire_async:
* @permission: a #GPermission instance
* @cancellable: (allow-none): a #GCancellable, or %NULL
* @cancellable: (nullable): a #GCancellable, or %NULL
* @callback: the #GAsyncReadyCallback to call when done
* @user_data: the user data to pass to @callback
*
@@ -165,7 +165,7 @@ g_permission_acquire_finish (GPermission *permission,
/**
* g_permission_release:
* @permission: a #GPermission instance
* @cancellable: (allow-none): a #GCancellable, or %NULL
* @cancellable: (nullable): a #GCancellable, or %NULL
* @error: a pointer to a %NULL #GError, or %NULL
*
* Attempts to release the permission represented by @permission.
@@ -201,7 +201,7 @@ g_permission_release (GPermission *permission,
/**
* g_permission_release_async:
* @permission: a #GPermission instance
* @cancellable: (allow-none): a #GCancellable, or %NULL
* @cancellable: (nullable): a #GCancellable, or %NULL
* @callback: the #GAsyncReadyCallback to call when done
* @user_data: the user data to pass to @callback
*