[glib: 4/7] gdbusconnection: Add missing (transfer) and (nullable) return annotations
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 4/7] gdbusconnection: Add missing (transfer) and (nullable) return annotations
- Date: Tue, 15 Dec 2020 09:31:54 +0000 (UTC)
commit 06b5e3e54cab1676d8ddc1695b73f6807bcd25a9
Author: Philip Withnall <pwithnall endlessos org>
Date: Tue Dec 15 09:13:22 2020 +0000
gdbusconnection: 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/gdbusconnection.c | 33 +++++++++++++++++----------------
gio/gdbusconnection.h | 6 +++---
2 files changed, 20 insertions(+), 19 deletions(-)
---
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index 65939a4d2..7a100f89a 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -1102,7 +1102,7 @@ g_dbus_connection_init (GDBusConnection *connection)
* stream from a worker thread, so it is not safe to interact with
* the stream directly.
*
- * Returns: (transfer none): the stream used for IO
+ * Returns: (transfer none) (not nullable): the stream used for IO
*
* Since: 2.26
*/
@@ -2732,7 +2732,7 @@ g_dbus_connection_new (GIOStream *stream,
*
* Finishes an operation started with g_dbus_connection_new().
*
- * Returns: a #GDBusConnection or %NULL if @error is set. Free
+ * Returns: (transfer full): a #GDBusConnection or %NULL if @error is set. Free
* with g_object_unref().
*
* Since: 2.26
@@ -2784,7 +2784,8 @@ g_dbus_connection_new_finish (GAsyncResult *res,
* This is a synchronous failable constructor. See
* g_dbus_connection_new() for the asynchronous version.
*
- * Returns: a #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
+ * Returns: (transfer full): a #GDBusConnection or %NULL if @error is set.
+ * Free with g_object_unref().
*
* Since: 2.26
*/
@@ -2875,8 +2876,8 @@ g_dbus_connection_new_for_address (const gchar *address,
*
* Finishes an operation started with g_dbus_connection_new_for_address().
*
- * Returns: a #GDBusConnection or %NULL if @error is set. Free with
- * g_object_unref().
+ * Returns: (transfer full): a #GDBusConnection or %NULL if @error is set.
+ * Free with g_object_unref().
*
* Since: 2.26
*/
@@ -2927,8 +2928,8 @@ g_dbus_connection_new_for_address_finish (GAsyncResult *res,
* If @observer is not %NULL it may be used to control the
* authentication process.
*
- * Returns: a #GDBusConnection or %NULL if @error is set. Free with
- * g_object_unref().
+ * Returns: (transfer full): a #GDBusConnection or %NULL if @error is set.
+ * Free with g_object_unref().
*
* Since: 2.26
*/
@@ -3017,7 +3018,7 @@ g_dbus_connection_get_exit_on_close (GDBusConnection *connection)
* The GUID of the peer performing the role of server when
* authenticating. See #GDBusConnection:guid for more details.
*
- * Returns: The GUID. Do not free this string, it is owned by
+ * Returns: (not nullable): The GUID. Do not free this string, it is owned by
* @connection.
*
* Since: 2.26
@@ -6139,8 +6140,8 @@ g_dbus_connection_call (GDBusConnection *connection,
*
* Finishes an operation started with g_dbus_connection_call().
*
- * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
- * return values. Free with g_variant_unref().
+ * Returns: (transfer full): %NULL if @error is set. Otherwise a non-floating
+ * #GVariant tuple with return values. Free with g_variant_unref().
*
* Since: 2.26
*/
@@ -6206,8 +6207,8 @@ g_dbus_connection_call_finish (GDBusConnection *connection,
* g_dbus_connection_call() for the asynchronous version of
* this method.
*
- * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
- * return values. Free with g_variant_unref().
+ * Returns: (transfer full): %NULL if @error is set. Otherwise a non-floating
+ * #GVariant tuple with return values. Free with g_variant_unref().
*
* Since: 2.26
*/
@@ -6309,8 +6310,8 @@ g_dbus_connection_call_with_unix_fd_list (GDBusConnection *connection,
* access file descriptors if they are referenced in this way by a
* value of type %G_VARIANT_TYPE_HANDLE in the body of the message.
*
- * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
- * return values. Free with g_variant_unref().
+ * Returns: (transfer full): %NULL if @error is set. Otherwise a non-floating
+ * #GVariant tuple with return values. Free with g_variant_unref().
*
* Since: 2.30
*/
@@ -6348,8 +6349,8 @@ g_dbus_connection_call_with_unix_fd_list_finish (GDBusConnection *connection,
*
* This method is only available on UNIX.
*
- * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
- * return values. Free with g_variant_unref().
+ * Returns: (transfer full): %NULL if @error is set. Otherwise a non-floating
+ * #GVariant tuple with return values. Free with g_variant_unref().
*
* Since: 2.30
*/
diff --git a/gio/gdbusconnection.h b/gio/gdbusconnection.h
index 05ef384e4..849bed96d 100644
--- a/gio/gdbusconnection.h
+++ b/gio/gdbusconnection.h
@@ -436,7 +436,7 @@ gboolean g_dbus_connection_unregister_object (GDBusConnection
*
* The return value will be freed with g_strfreev().
*
- * Returns: A newly allocated array of strings for node names that are children of @object_path.
+ * Returns: (array zero-terminated=1) (transfer full): A newly allocated array of strings for node names
that are children of @object_path.
*
* Since: 2.26
*/
@@ -472,7 +472,7 @@ typedef gchar** (*GDBusSubtreeEnumerateFunc) (GDBusConnection *connection,
* remote introspector in the empty array case, but not in the %NULL
* case.
*
- * Returns: A %NULL-terminated array of pointers to #GDBusInterfaceInfo, or %NULL.
+ * Returns: (array zero-terminated=1) (nullable) (transfer full): A %NULL-terminated array of pointers to
#GDBusInterfaceInfo, or %NULL.
*
* Since: 2.26
*/
@@ -497,7 +497,7 @@ typedef GDBusInterfaceInfo ** (*GDBusSubtreeIntrospectFunc) (GDBusConnection
* Subtrees are flat. @node, if non-%NULL, is always exactly one
* segment of the object path (ie: it never contains a slash).
*
- * Returns: A #GDBusInterfaceVTable or %NULL if you don't want to handle the methods.
+ * Returns: (nullable): A #GDBusInterfaceVTable or %NULL if you don't want to handle the methods.
*
* Since: 2.26
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]