From 0663a9bd56184fa2f4020337abab9bb35761baec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20No=C3=ABl?= Date: Tue, 28 Apr 2020 10:49:57 +0200 Subject: [PATCH] gdesktopappinfo: Add several nullable annotation to GAppInfo getters Some functions can return a NULL GAppInfo when the conditions given as arguments are not met. --- gio/gdesktopappinfo.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c index ab3a2bb5e..ecd2d3c47 100644 --- a/gio/gdesktopappinfo.c +++ b/gio/gdesktopappinfo.c @@ -4320,7 +4320,7 @@ g_app_info_reset_type_associations (const char *content_type) * * Gets the default #GAppInfo for a given content type. * - * Returns: (transfer full): #GAppInfo for given @content_type or + * Returns: (transfer full) (nullable): #GAppInfo for given @content_type or * %NULL on error. */ GAppInfo * @@ -4397,7 +4397,8 @@ out: * of the URI, up to but not including the ':', e.g. "http", * "ftp" or "sip". * - * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error. + * Returns: (transfer full) (nullable): #GAppInfo for given @uri_scheme or + * %NULL on error. */ GAppInfo * g_app_info_get_default_for_uri_scheme (const char *uri_scheme) @@ -4640,7 +4641,8 @@ g_desktop_app_info_lookup_default_init (GDesktopAppInfoLookupInterface *iface) * in a GIO module. There is no reason for applications to use it * directly. Applications should use g_app_info_get_default_for_uri_scheme(). * - * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error. + * Returns: (transfer full) (nullable): #GAppInfo for given @uri_scheme or + * %NULL on error. * * Deprecated: 2.28: The #GDesktopAppInfoLookup interface is deprecated and * unused by GIO.