docs: Fix (nullable) (optional) annotations

There are a few places where commit 18a33f72 replaced valid (nullable)
(optional) annotations with just (optional). That has a different
meaning.

(nullable) (optional) can only be applied to gpointer* parameters, and
means that both the gpointer* and returned gpointer can be NULL. i.e.
The caller can pass in NULL to ignore the return value; and the returned
value can be NULL.

(optional) can be applied to anything* parameters, and means that the
anything* can be NULL. i.e. The caller can pass in NULL to ignore the
return value. The return value cannot be NULL.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall
2017-04-28 12:29:44 +01:00
parent 88ad0dab21
commit b63469d726
6 changed files with 14 additions and 14 deletions

View File

@@ -639,7 +639,7 @@ accept_callback (GSocket *socket,
/**
* g_socket_listener_accept_socket:
* @listener: a #GSocketListener
* @source_object: (out) (transfer none) (optional): location where #GObject pointer will be stored, or %NULL.
* @source_object: (out) (transfer none) (optional) (nullable): location where #GObject pointer will be stored, or %NULL.
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @error: #GError for error reporting, or %NULL to ignore.
*
@@ -716,7 +716,7 @@ g_socket_listener_accept_socket (GSocketListener *listener,
/**
* g_socket_listener_accept:
* @listener: a #GSocketListener
* @source_object: (out) (transfer none) (optional): location where #GObject pointer will be stored, or %NULL
* @source_object: (out) (transfer none) (optional) (nullable): location where #GObject pointer will be stored, or %NULL
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @error: #GError for error reporting, or %NULL to ignore.
*
@@ -834,7 +834,7 @@ g_socket_listener_accept_socket_async (GSocketListener *listener,
* g_socket_listener_accept_socket_finish:
* @listener: a #GSocketListener
* @result: a #GAsyncResult.
* @source_object: (out) (transfer none) (optional): Optional #GObject identifying this source
* @source_object: (out) (transfer none) (optional) (nullable): Optional #GObject identifying this source
* @error: a #GError location to store the error occurring, or %NULL to
* ignore.
*
@@ -890,7 +890,7 @@ g_socket_listener_accept_async (GSocketListener *listener,
* g_socket_listener_accept_finish:
* @listener: a #GSocketListener
* @result: a #GAsyncResult.
* @source_object: (out) (transfer none) (optional): Optional #GObject identifying this source
* @source_object: (out) (transfer none) (optional) (nullable): Optional #GObject identifying this source
* @error: a #GError location to store the error occurring, or %NULL to
* ignore.
*