Merge branch 'docs' into 'master'

docs: Add (nullable) annotations

Closes #2124

See merge request GNOME/glib!1521
This commit is contained in:
Philip Withnall 2020-06-05 14:05:12 +00:00
commit 633413909d

View File

@ -858,8 +858,8 @@ g_file_info_get_attribute_as_string (GFileInfo *info,
* Gets the value of a #GObject attribute. If the attribute does * Gets the value of a #GObject attribute. If the attribute does
* not contain a #GObject, %NULL will be returned. * not contain a #GObject, %NULL will be returned.
* *
* Returns: (transfer none): a #GObject associated with the given @attribute, or * Returns: (transfer none) (nullable): a #GObject associated with the given @attribute,
* %NULL otherwise. * or %NULL otherwise.
**/ **/
GObject * GObject *
g_file_info_get_attribute_object (GFileInfo *info, 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 * Gets the value of a string attribute. If the attribute does
* not contain a string, %NULL will be returned. * not contain a string, %NULL will be returned.
* *
* Returns: the contents of the @attribute value as a UTF-8 string, or * Returns: (nullable): the contents of the @attribute value as a UTF-8 string,
* %NULL otherwise. * or %NULL otherwise.
**/ **/
const char * const char *
g_file_info_get_attribute_string (GFileInfo *info, 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 * Gets the value of a byte string attribute. If the attribute does
* not contain a byte string, %NULL will be returned. * 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. * %NULL otherwise.
**/ **/
const char * 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 * Gets the value of a stringv attribute. If the attribute does
* not contain a stringv, %NULL will be returned. * not contain a stringv, %NULL will be returned.
* *
* Returns: (transfer none): the contents of the @attribute value as a stringv, or * Returns: (transfer none) (nullable): the contents of the @attribute value as a stringv,
* %NULL otherwise. Do not free. These returned strings are UTF-8. * or %NULL otherwise. Do not free. These returned strings are UTF-8.
* *
* Since: 2.22 * 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 * available in G_FILE_ATTRIBUTE_TRASH_DELETION_DATE. If the
* G_FILE_ATTRIBUTE_TRASH_DELETION_DATE attribute is unset, %NULL is returned. * 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 * Since: 2.36
**/ **/
@ -1708,7 +1708,8 @@ g_file_info_get_symbolic_icon (GFileInfo *info)
* *
* Gets the file's content type. * 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 * const char *
g_file_info_get_content_type (GFileInfo *info) 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. * 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. * no more attribute exist.
**/ **/
const char * const char *