[glib: 3/7] gdbusaddress: Add missing (transfer) and (nullable) return annotations




commit b19782e26bf8614af98146bd04af1cbf5a104d98
Author: Philip Withnall <pwithnall endlessos org>
Date:   Tue Dec 15 09:11:50 2020 +0000

    gdbusaddress: Add missing (transfer) and (nullable) return annotations
    
    This commit only looks at the `Returns:` lines in the documentation, and
    has examined all of them in the file. Function arguments have not been
    checked.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #2227

 gio/gdbusaddress.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c
index 3dd3cc84b..26d52ea36 100644
--- a/gio/gdbusaddress.c
+++ b/gio/gdbusaddress.c
@@ -903,11 +903,14 @@ g_dbus_address_get_stream (const gchar         *address,
 /**
  * g_dbus_address_get_stream_finish:
  * @res: A #GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream().
- * @out_guid: (optional) (out): %NULL or return location to store the GUID extracted from @address, if any.
+ * @out_guid: (optional) (out) (nullable): %NULL or return location to store the GUID extracted from 
@address, if any.
  * @error: Return location for error or %NULL.
  *
  * Finishes an operation started with g_dbus_address_get_stream().
  *
+ * A server is not required to set a GUID, so @out_guid may be set to %NULL
+ * even on success.
+ *
  * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
  *
  * Since: 2.26
@@ -940,7 +943,7 @@ g_dbus_address_get_stream_finish (GAsyncResult        *res,
 /**
  * g_dbus_address_get_stream_sync:
  * @address: A valid D-Bus address.
- * @out_guid: (optional) (out): %NULL or return location to store the GUID extracted from @address, if any.
+ * @out_guid: (optional) (out) (nullable): %NULL or return location to store the GUID extracted from 
@address, if any.
  * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
@@ -949,6 +952,9 @@ g_dbus_address_get_stream_finish (GAsyncResult        *res,
  * of the D-Bus authentication conversation. @address must be in the
  * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses).
  *
+ * A server is not required to set a GUID, so @out_guid may be set to %NULL
+ * even on success.
+ *
  * This is a synchronous failable function. See
  * g_dbus_address_get_stream() for the asynchronous version.
  *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]