[vala/mjog/gbytes-nullable-get-data] glib: Flag GLib.Bytes.get_data return value as nullable



commit 01d660f154c467eef1ce18e6f12d28f5e84ea967
Author: Michael Gratton <mike vee net>
Date:   Thu Jun 25 16:56:46 2020 +1000

    glib: Flag GLib.Bytes.get_data return value as nullable
    
    [Per the docs](https://developer.gnome.org/glib/stable/glib-Byte-Arrays.html#g-bytes-get-data),
    this method can return null if the size of the buffer is 0.

 vapi/glib-2.0.vapi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index 839ceff98..69d4d3b8a 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -5328,7 +5328,7 @@ namespace GLib {
                public static Bytes new_with_owner<T> ([CCode (array_length_type = "gsize")] uint8[] data, 
[CCode (destroy_notify_pos = 1.9)] owned T? owner = null);
 
                [CCode (array_length_type = "gsize")]
-               public unowned uint8[] get_data ();
+               public unowned uint8[]? get_data ();
                public size_t get_size ();
                public uint hash ();
                public int compare (GLib.Bytes bytes2);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]