]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
glib-2.0: Add Bytes.new_with_owner with an owned generic argument
authorMichal Hruby <michal.mhr@gmail.com>
Mon, 28 May 2012 18:46:45 +0000 (20:46 +0200)
committerMichal Hruby <michal.mhr@gmail.com>
Mon, 28 May 2012 18:46:45 +0000 (20:46 +0200)
vapi/glib-2.0.vapi

index 0addc3eae6822f9adff006c80e225dad26a01f33..89400d755a03c65048893fac66b6fc4746310674 100644 (file)
@@ -4055,6 +4055,9 @@ namespace GLib {
                public Bytes.with_free_func ([CCode (array_length_type = "gsize")] owned uint8[] data, GLib.DestroyNotify? free_func = GLib.g_free);
                public Bytes.from_bytes (GLib.Bytes bytes, size_t offset, size_t length);
 
+               [CCode (cname = "g_bytes_new_with_free_func", simple_generics = true)]
+               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 size_t get_size ();