]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
glib-2.0: annotate nullable GLib.Uri arguments and return values
authorMarc-André Lureau <marcandre.lureau@gmail.com>
Wed, 23 May 2012 00:24:31 +0000 (02:24 +0200)
committerMarc-André Lureau <marcandre.lureau@gmail.com>
Wed, 23 May 2012 00:26:25 +0000 (02:26 +0200)
g_uri_*() functions can take null values, return null as a normal
operation, ex: parse_scheme() returns null when no scheme...

https://bugzilla.gnome.org/show_bug.cgi?id=676609

vapi/glib-2.0.vapi

index b1f7a9ae3b6839df05f110788a3f88d9cd5a06f4..e6a5ba4b2dda3083f345b682cb149f47e20544a7 100644 (file)
@@ -3102,10 +3102,10 @@ namespace GLib {
                public const string RESERVED_CHARS_GENERIC_DELIMITERS;
                public const string RESERVED_CHARS_SUBCOMPONENT_DELIMITERS;
 
-               public static string parse_scheme (string uri);
-               public static string escape_string (string unescaped, string reserved_chars_allowed, bool allow_utf8);
-               public static string unescape_string (string escaped_string, string? illegal_characters = null);
-               public static string unescape_segment (string escaped_string, string escaped_string_end, string? illegal_characters = null);
+               public static string? parse_scheme (string uri);
+               public static string escape_string (string unescaped, string? reserved_chars_allowed = null, bool allow_utf8 = true);
+               public static string? unescape_string (string escaped_string, string? illegal_characters = null);
+               public static string? unescape_segment (string? escaped_string, string? escaped_string_end, string? illegal_characters = null);
                [CCode (array_length = false, array_null_terminated = true)]
                public static string[] list_extract_uris (string uri_list);
        }