]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
glib-2.0, gio-2.0: Fix some nullable types in ContentType, Icon, HashTable
authorPhilip Withnall <philip@tecnocode.co.uk>
Thu, 22 Dec 2011 00:10:18 +0000 (00:10 +0000)
committerJürg Billeter <j@bitron.ch>
Tue, 31 Jan 2012 12:07:33 +0000 (13:07 +0100)
Fixes bug 666699.

vapi/gio-2.0.vapi
vapi/glib-2.0.vapi
vapi/packages/gio-2.0/gio-2.0-custom.vala
vapi/packages/gio-2.0/gio-2.0.metadata

index fa9bc6c7765e40750229fa395c8babce41f5b4da..f6095df2ebf4d51b6868aefbc1af0cad2b9847d9 100644 (file)
@@ -30,13 +30,13 @@ namespace GLib {
                [CCode (cheader_filename = "gio/gio.h")]
                public static bool equals (string type1, string type2);
                [CCode (cheader_filename = "gio/gio.h")]
-               public static string from_mime_type (string mime_type);
+               public static string? from_mime_type (string mime_type);
                [CCode (cheader_filename = "gio/gio.h")]
                public static string get_description (string type);
                [CCode (cheader_filename = "gio/gio.h")]
                public static GLib.Icon get_icon (string type);
                [CCode (cheader_filename = "gio/gio.h")]
-               public static string get_mime_type (string type);
+               public static string? get_mime_type (string type);
                [CCode (cheader_filename = "gio/gio.h")]
                public static string guess (string? filename, uchar[]? data, out bool result_uncertain);
                [CCode (array_length = false, array_null_terminated = true, cheader_filename = "gio/gio.h")]
@@ -2012,7 +2012,7 @@ namespace GLib {
        }
        [CCode (cheader_filename = "gio/gio.h")]
        public interface Icon : GLib.Object {
-               public abstract bool equal (GLib.Icon icon2);
+               public abstract bool equal (GLib.Icon? icon2);
                [NoWrapper]
                public virtual GLib.Icon? from_tokens (string[] tokens, int version) throws GLib.Error;
                public abstract uint hash ();
@@ -2939,7 +2939,7 @@ namespace GLib {
        public static bool g_content_type_equals (string type1, string type2);
        [CCode (cheader_filename = "gio/gio.h", cname = "g_content_type_from_mime_type")]
        [Deprecated (replacement = "GLib.ContentType.from_mime_type", since = "vala-0.12")]
-       public static string g_content_type_from_mime_type (string mime_type);
+       public static string? g_content_type_from_mime_type (string mime_type);
        [CCode (cheader_filename = "gio/gio.h", cname = "g_content_type_get_description")]
        [Deprecated (replacement = "GLib.ContentType.get_description", since = "vala-0.12")]
        public static string g_content_type_get_description (string type);
@@ -2948,7 +2948,7 @@ namespace GLib {
        public static GLib.Icon g_content_type_get_icon (string type);
        [CCode (cheader_filename = "gio/gio.h", cname = "g_content_type_get_mime_type")]
        [Deprecated (replacement = "GLib.ContentType.get_mime_type", since = "vala-0.12")]
-       public static string g_content_type_get_mime_type (string type);
+       public static string? g_content_type_get_mime_type (string type);
        [CCode (cheader_filename = "gio/gio.h", cname = "g_content_type_guess")]
        [Deprecated (replacement = "GLib.ContentType.guess", since = "vala-0.12")]
        public static string g_content_type_guess (string filename, uchar[] data, out bool result_uncertain);
index ef67fdd0d25a1a60cc2e81bf048b96e5ea51797c..a3e6c94fc0562daee13b7aa1e6726e87c03959c1 100644 (file)
@@ -3904,7 +3904,7 @@ namespace GLib {
                public HashTable.full (HashFunc<K>? hash_func, EqualFunc<K>? key_equal_func, DestroyNotify? key_destroy_func, DestroyNotify? value_destroy_func);
                public void insert (owned K key, owned V value);
                public void replace (owned K key, owned V value);
-               public unowned V lookup (K key);
+               public unowned V? lookup (K key);
                public bool lookup_extended (K lookup_key, out unowned K orig_key, out unowned V value);
                public bool remove (K key);
                public void remove_all ();
@@ -3917,7 +3917,7 @@ namespace GLib {
                public void @foreach (HFunc<K,V> func);
                [CCode (cname = "g_hash_table_foreach")]
                public void for_each (HFunc<K,V> func);
-               public unowned V find (HRFunc<K,V> predicate);
+               public unowned V? find (HRFunc<K,V> predicate);
                public uint size ();
                public bool steal (K key);
                public void steal_all ();
index f36fb421fbf65b10a00cea31d50a5c0bcd12e0a8..d35d95fce93a8156dc518acde16ca842ae958ffa 100644 (file)
@@ -84,7 +84,7 @@ namespace GLib {
        public static bool g_content_type_equals (string type1, string type2);
        [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.from_mime_type")]
        [CCode (cname = "g_content_type_from_mime_type", cheader_filename = "gio/gio.h")]
-       public static string g_content_type_from_mime_type (string mime_type);
+       public static string? g_content_type_from_mime_type (string mime_type);
        [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.get_description")]
        [CCode (cname = "g_content_type_get_description", cheader_filename = "gio/gio.h")]
        public static string g_content_type_get_description (string type);
@@ -93,7 +93,7 @@ namespace GLib {
        public static GLib.Icon g_content_type_get_icon (string type);
        [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.get_mime_type")]
        [CCode (cname = "g_content_type_get_mime_type", cheader_filename = "gio/gio.h")]
-       public static string g_content_type_get_mime_type (string type);
+       public static string? g_content_type_get_mime_type (string type);
        [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.guess")]
        [CCode (cname = "g_content_type_guess", cheader_filename = "gio/gio.h")]
        public static string g_content_type_guess (string filename, uchar[] data, out bool result_uncertain);
index 5707981d0de37edae927814f2fd9520fd28df5c3..81dd7fa31739a128b24d5fee25e1c20ec3318e48 100644 (file)
@@ -25,7 +25,7 @@ GCancellableSourceFunc.cancellable nullable="1"
 g_cancellable_get_current nullable="1"
 g_content_type_can_be_executable parent="ContentType"
 g_content_type_equals parent="ContentType"
-g_content_type_from_mime_type parent="ContentType" transfer_ownership="1"
+g_content_type_from_mime_type parent="ContentType" transfer_ownership="1" nullable="1"
 g_content_type_get_* parent="ContentType" transfer_ownership="1"
 g_content_type_guess* parent="ContentType" transfer_ownership="1"
 g_content_type_guess.filename nullable="1"
@@ -34,6 +34,7 @@ g_content_type_guess.data_size hidden="1"
 g_content_type_guess.result_uncertain is_out="1"
 g_content_type_guess_for_tree parent="ContentType" transfer_ownership="1" is_array="1" no_array_length="1" array_null_terminated="1" transfer_ownership="1"
 g_content_type_is_* parent="ContentType"
+g_content_type_get_mime_type parent="ContentType" transfer_ownership="1" nullable="1"
 g_content_types_get_registered type_arguments="string" transfer_ownership="1"
 g_converter_convert.inbuf type_name="uint8" is_array="1" array_length_type="gsize"
 g_converter_convert.inbuf_size hidden="1"
@@ -217,6 +218,7 @@ g_icon_to_tokens virtual="1"
 g_icon_to_tokens.out_version is_out="1"
 g_icon_hash.icon hidden="1"
 g_icon_to_string transfer_ownership="1" nullable="1"
+g_icon_equal.icon2 nullable="1"
 g_inet_address_new_from_bytes.bytes type_name="uint8" is_array="1" no_array_length="1"
 g_inet_address_to_string transfer_ownership="1"
 g_inet_address_to_bytes type_name="uint8" is_array="1" no_array_length="1"