[glib: 1/2] gio: Add missing (nullable) annotations to GDrive, GMount, GVolume



commit 41ec0b9c6059030657ebc482485794255e960d3b
Author: Philip Withnall <withnall endlessm com>
Date:   Wed Mar 21 15:19:07 2018 +0000

    gio: Add missing (nullable) annotations to GDrive, GMount, GVolume
    
    Signed-off-by: Philip Withnall <withnall endlessm com>
    
    https://gitlab.gnome.org/GNOME/glib/issues/1354

 gio/gdrive.c  |  4 ++--
 gio/gmount.c  | 13 ++++++++-----
 gio/gvolume.c | 15 ++++++++-------
 3 files changed, 18 insertions(+), 14 deletions(-)
---
diff --git a/gio/gdrive.c b/gio/gdrive.c
index bd42691d9..af0df911f 100644
--- a/gio/gdrive.c
+++ b/gio/gdrive.c
@@ -613,7 +613,7 @@ g_drive_poll_for_media_finish (GDrive        *drive,
  *
  * Gets the identifier of the given kind for @drive.
  *
- * Returns: a newly allocated string containing the
+ * Returns: (nullable) (transfer full): a newly allocated string containing the
  *     requested identfier, or %NULL if the #GDrive
  *     doesn't have this kind of identifier.
  */
@@ -921,7 +921,7 @@ g_drive_stop_finish (GDrive        *drive,
  *
  * Gets the sort key for @drive, if any.
  *
- * Returns: Sorting key for @drive or %NULL if no such key is available.
+ * Returns: (nullable): Sorting key for @drive or %NULL if no such key is available.
  *
  * Since: 2.32
  */
diff --git a/gio/gmount.c b/gio/gmount.c
index 0169ea54b..dad4b8513 100644
--- a/gio/gmount.c
+++ b/gio/gmount.c
@@ -255,7 +255,8 @@ g_mount_get_symbolic_icon (GMount *mount)
  * considered an opaque string. Returns %NULL if there is no UUID
  * available.
  * 
- * Returns: the UUID for @mount or %NULL if no UUID can be computed.
+ * Returns: (nullable) (transfer full): the UUID for @mount or %NULL if no UUID
+ *     can be computed.
  *     The returned string should be freed with g_free()
  *     when no longer needed.
  **/
@@ -276,8 +277,9 @@ g_mount_get_uuid (GMount *mount)
  * @mount: a #GMount.
  * 
  * Gets the volume for the @mount.
- * 
- * Returns: (transfer full): a #GVolume or %NULL if @mount is not associated with a volume.
+ *
+ * Returns: (transfer full) (nullable): a #GVolume or %NULL if @mount is not
+ *      associated with a volume.
  *      The returned object should be unreffed with 
  *      g_object_unref() when no longer needed.
  **/
@@ -302,7 +304,8 @@ g_mount_get_volume (GMount *mount)
  * This is a convenience method for getting the #GVolume and then
  * using that object to get the #GDrive.
  * 
- * Returns: (transfer full): a #GDrive or %NULL if @mount is not associated with a volume or a drive.
+ * Returns: (transfer full) (nullable): a #GDrive or %NULL if @mount is not
+ *      associated with a volume or a drive.
  *      The returned object should be unreffed with 
  *      g_object_unref() when no longer needed.
  **/
@@ -1037,7 +1040,7 @@ g_mount_unshadow (GMount *mount)
  *
  * Gets the sort key for @mount, if any.
  *
- * Returns: Sorting key for @mount or %NULL if no such key is available.
+ * Returns: (nullable): Sorting key for @mount or %NULL if no such key is available.
  *
  * Since: 2.32
  */
diff --git a/gio/gvolume.c b/gio/gvolume.c
index f97ce4c12..e934df820 100644
--- a/gio/gvolume.c
+++ b/gio/gvolume.c
@@ -195,7 +195,8 @@ g_volume_get_symbolic_icon (GVolume *volume)
  * considered an opaque string. Returns %NULL if there is no UUID
  * available.
  * 
- * Returns: the UUID for @volume or %NULL if no UUID can be computed.
+ * Returns: (nullable) (transfer full): the UUID for @volume or %NULL if no UUID
+ *     can be computed.
  *     The returned string should be freed with g_free() 
  *     when no longer needed.
  */
@@ -216,8 +217,8 @@ g_volume_get_uuid (GVolume *volume)
  * @volume: a #GVolume
  * 
  * Gets the drive for the @volume.
- * 
- * Returns: (transfer full): a #GDrive or %NULL if @volume is not
+ *
+ * Returns: (transfer full) (nullable): a #GDrive or %NULL if @volume is not
  *     associated with a drive. The returned object should be unreffed
  *     with g_object_unref() when no longer needed.
  */
@@ -238,8 +239,8 @@ g_volume_get_drive (GVolume *volume)
  * @volume: a #GVolume
  * 
  * Gets the mount for the @volume.
- * 
- * Returns: (transfer full): a #GMount or %NULL if @volume isn't mounted.
+ *
+ * Returns: (transfer full) (nullable): a #GMount or %NULL if @volume isn't mounted.
  *     The returned object should be unreffed with g_object_unref()
  *     when no longer needed.
  */
@@ -565,7 +566,7 @@ g_volume_eject_with_operation_finish (GVolume        *volume,
  * See the [introduction][volume-identifier] for more
  * information about volume identifiers.
  *
- * Returns: a newly allocated string containing the
+ * Returns: (nullable) (transfer full): a newly allocated string containing the
  *     requested identfier, or %NULL if the #GVolume
  *     doesn't have this kind of identifier
  */
@@ -666,7 +667,7 @@ g_volume_get_activation_root (GVolume *volume)
  *
  * Gets the sort key for @volume, if any.
  *
- * Returns: Sorting key for @volume or %NULL if no such key is available
+ * Returns: (nullable): Sorting key for @volume or %NULL if no such key is available
  *
  * Since: 2.32
  */


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