mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 06:33:41 +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:
@@ -489,7 +489,7 @@ g_socket_client_get_local_address (GSocketClient *client)
|
||||
/**
|
||||
* g_socket_client_set_local_address:
|
||||
* @client: a #GSocketClient.
|
||||
* @address: (allow-none): a #GSocketAddress, or %NULL
|
||||
* @address: (nullable): a #GSocketAddress, or %NULL
|
||||
*
|
||||
* Sets the local address of the socket client.
|
||||
* The sockets created by this object will bound to the
|
||||
@@ -720,7 +720,7 @@ g_socket_client_get_proxy_resolver (GSocketClient *client)
|
||||
/**
|
||||
* g_socket_client_set_proxy_resolver:
|
||||
* @client: a #GSocketClient.
|
||||
* @proxy_resolver: (allow-none): a #GProxyResolver, or %NULL for the
|
||||
* @proxy_resolver: (nullable): a #GProxyResolver, or %NULL for the
|
||||
* default.
|
||||
*
|
||||
* Overrides the #GProxyResolver used by @client. You can call this if
|
||||
@@ -939,7 +939,7 @@ g_socket_client_emit_event (GSocketClient *client,
|
||||
* g_socket_client_connect:
|
||||
* @client: a #GSocketClient.
|
||||
* @connectable: a #GSocketConnectable specifying the remote address.
|
||||
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
|
||||
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
|
||||
* @error: #GError for error reporting, or %NULL to ignore.
|
||||
*
|
||||
* Tries to resolve the @connectable and make a network connection to it.
|
||||
@@ -1163,7 +1163,7 @@ g_socket_client_connect (GSocketClient *client,
|
||||
* @client: a #GSocketClient
|
||||
* @host_and_port: the name and optionally port of the host to connect to
|
||||
* @default_port: the default port to connect to
|
||||
* @cancellable: (allow-none): a #GCancellable, or %NULL
|
||||
* @cancellable: (nullable): a #GCancellable, or %NULL
|
||||
* @error: a pointer to a #GError, or %NULL
|
||||
*
|
||||
* This is a helper function for g_socket_client_connect().
|
||||
@@ -1227,7 +1227,7 @@ g_socket_client_connect_to_host (GSocketClient *client,
|
||||
* @client: a #GSocketConnection
|
||||
* @domain: a domain name
|
||||
* @service: the name of the service to connect to
|
||||
* @cancellable: (allow-none): a #GCancellable, or %NULL
|
||||
* @cancellable: (nullable): a #GCancellable, or %NULL
|
||||
* @error: a pointer to a #GError, or %NULL
|
||||
*
|
||||
* Attempts to create a TCP connection to a service.
|
||||
@@ -1270,7 +1270,7 @@ g_socket_client_connect_to_service (GSocketClient *client,
|
||||
* @client: a #GSocketClient
|
||||
* @uri: A network URI
|
||||
* @default_port: the default port to connect to
|
||||
* @cancellable: (allow-none): a #GCancellable, or %NULL
|
||||
* @cancellable: (nullable): a #GCancellable, or %NULL
|
||||
* @error: a pointer to a #GError, or %NULL
|
||||
*
|
||||
* This is a helper function for g_socket_client_connect().
|
||||
@@ -1637,7 +1637,7 @@ g_socket_client_enumerator_callback (GObject *object,
|
||||
* g_socket_client_connect_async:
|
||||
* @client: a #GSocketClient
|
||||
* @connectable: a #GSocketConnectable specifying the remote address.
|
||||
* @cancellable: (allow-none): a #GCancellable, or %NULL
|
||||
* @cancellable: (nullable): a #GCancellable, or %NULL
|
||||
* @callback: (scope async): a #GAsyncReadyCallback
|
||||
* @user_data: (closure): user data for the callback
|
||||
*
|
||||
@@ -1690,7 +1690,7 @@ g_socket_client_connect_async (GSocketClient *client,
|
||||
* @client: a #GSocketClient
|
||||
* @host_and_port: the name and optionally the port of the host to connect to
|
||||
* @default_port: the default port to connect to
|
||||
* @cancellable: (allow-none): a #GCancellable, or %NULL
|
||||
* @cancellable: (nullable): a #GCancellable, or %NULL
|
||||
* @callback: (scope async): a #GAsyncReadyCallback
|
||||
* @user_data: (closure): user data for the callback
|
||||
*
|
||||
@@ -1736,7 +1736,7 @@ g_socket_client_connect_to_host_async (GSocketClient *client,
|
||||
* @client: a #GSocketClient
|
||||
* @domain: a domain name
|
||||
* @service: the name of the service to connect to
|
||||
* @cancellable: (allow-none): a #GCancellable, or %NULL
|
||||
* @cancellable: (nullable): a #GCancellable, or %NULL
|
||||
* @callback: (scope async): a #GAsyncReadyCallback
|
||||
* @user_data: (closure): user data for the callback
|
||||
*
|
||||
@@ -1767,7 +1767,7 @@ g_socket_client_connect_to_service_async (GSocketClient *client,
|
||||
* @client: a #GSocketClient
|
||||
* @uri: a network uri
|
||||
* @default_port: the default port to connect to
|
||||
* @cancellable: (allow-none): a #GCancellable, or %NULL
|
||||
* @cancellable: (nullable): a #GCancellable, or %NULL
|
||||
* @callback: (scope async): a #GAsyncReadyCallback
|
||||
* @user_data: (closure): user data for the callback
|
||||
*
|
||||
|
Reference in New Issue
Block a user