[glib: 1/2] docs: Add (nullable) annotations
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] docs: Add (nullable) annotations
- Date: Fri, 5 Jun 2020 14:05:30 +0000 (UTC)
commit e91f4ac961c4b83d8165c0f992c01238de32032a
Author: Avinash Sonawane <rootkea gmail com>
Date: Fri Jun 5 18:40:37 2020 +0530
docs: Add (nullable) annotations
gio/gfileinfo.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/gio/gfileinfo.c b/gio/gfileinfo.c
index 5ec5ec4c2..3e0ae1beb 100644
--- a/gio/gfileinfo.c
+++ b/gio/gfileinfo.c
@@ -858,8 +858,8 @@ g_file_info_get_attribute_as_string (GFileInfo *info,
* Gets the value of a #GObject attribute. If the attribute does
* not contain a #GObject, %NULL will be returned.
*
- * Returns: (transfer none): a #GObject associated with the given @attribute, or
- * %NULL otherwise.
+ * Returns: (transfer none) (nullable): a #GObject associated with the given @attribute,
+ * or %NULL otherwise.
**/
GObject *
g_file_info_get_attribute_object (GFileInfo *info,
@@ -882,8 +882,8 @@ g_file_info_get_attribute_object (GFileInfo *info,
* Gets the value of a string attribute. If the attribute does
* not contain a string, %NULL will be returned.
*
- * Returns: the contents of the @attribute value as a UTF-8 string, or
- * %NULL otherwise.
+ * Returns: (nullable): the contents of the @attribute value as a UTF-8 string,
+ * or %NULL otherwise.
**/
const char *
g_file_info_get_attribute_string (GFileInfo *info,
@@ -906,7 +906,7 @@ g_file_info_get_attribute_string (GFileInfo *info,
* Gets the value of a byte string attribute. If the attribute does
* not contain a byte string, %NULL will be returned.
*
- * Returns: the contents of the @attribute value as a byte string, or
+ * Returns: (nullable): the contents of the @attribute value as a byte string, or
* %NULL otherwise.
**/
const char *
@@ -930,8 +930,8 @@ g_file_info_get_attribute_byte_string (GFileInfo *info,
* Gets the value of a stringv attribute. If the attribute does
* not contain a stringv, %NULL will be returned.
*
- * Returns: (transfer none): the contents of the @attribute value as a stringv, or
- * %NULL otherwise. Do not free. These returned strings are UTF-8.
+ * Returns: (transfer none) (nullable): the contents of the @attribute value as a stringv,
+ * or %NULL otherwise. Do not free. These returned strings are UTF-8.
*
* Since: 2.22
**/
@@ -1454,7 +1454,7 @@ g_file_info_set_attribute_int64 (GFileInfo *info,
* available in G_FILE_ATTRIBUTE_TRASH_DELETION_DATE. If the
* G_FILE_ATTRIBUTE_TRASH_DELETION_DATE attribute is unset, %NULL is returned.
*
- * Returns: a #GDateTime, or %NULL.
+ * Returns: (nullable): a #GDateTime, or %NULL.
*
* Since: 2.36
**/
@@ -1708,7 +1708,8 @@ g_file_info_get_symbolic_icon (GFileInfo *info)
*
* Gets the file's content type.
*
- * Returns: a string containing the file's content type.
+ * Returns: (nullable): a string containing the file's content type,
+ * or %NULL if unknown.
**/
const char *
g_file_info_get_content_type (GFileInfo *info)
@@ -2728,7 +2729,7 @@ g_file_attribute_matcher_enumerate_namespace (GFileAttributeMatcher *matcher,
*
* Gets the next matched attribute from a #GFileAttributeMatcher.
*
- * Returns: a string containing the next attribute or %NULL if
+ * Returns: (nullable): a string containing the next attribute or, %NULL if
* no more attribute exist.
**/
const char *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]