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

@@ -501,7 +501,7 @@ g_tls_connection_get_certificate (GTlsConnection *conn)
/**
* g_tls_connection_set_interaction:
* @conn: a connection
* @interaction: (allow-none): an interaction object, or %NULL
* @interaction: (nullable): an interaction object, or %NULL
*
* Set the object that will be used to interact with the user. It will be used
* for things like prompting the user for passwords.
@@ -735,7 +735,7 @@ g_tls_connection_get_rehandshake_mode (GTlsConnection *conn)
/**
* g_tls_connection_handshake:
* @conn: a #GTlsConnection
* @cancellable: (allow-none): a #GCancellable, or %NULL
* @cancellable: (nullable): a #GCancellable, or %NULL
* @error: a #GError, or %NULL
*
* Attempts a TLS handshake on @conn.
@@ -779,7 +779,7 @@ g_tls_connection_handshake (GTlsConnection *conn,
* g_tls_connection_handshake_async:
* @conn: a #GTlsConnection
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (allow-none): a #GCancellable, or %NULL
* @cancellable: (nullable): a #GCancellable, or %NULL
* @callback: callback to call when the handshake is complete
* @user_data: the data to pass to the callback function
*