]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gdk-pixbuf-2.0: Make PixbufSaveFunc usable
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 9 Jan 2019 17:35:39 +0000 (18:35 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 9 Jan 2019 19:47:04 +0000 (20:47 +0100)
This delegates does place its target at the end, where vala expects
the error parameter. Vala does not support that at this point.

See https://gitlab.gnome.org/GNOME/vala/issues/728

vapi/gdk-pixbuf-2.0.vapi
vapi/metadata/GdkPixbuf-2.0-custom.vala
vapi/metadata/GdkPixbuf-2.0.metadata

index ba9088a64d4f86483695060fcd54665d8252c5d3..3320618ed5978aa1fad29e116f9640bf4b8ffa6f 100644 (file)
@@ -311,8 +311,9 @@ namespace Gdk {
        }
        [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", instance_pos = 1.9)]
        public delegate void PixbufDestroyNotify ([CCode (array_length = false)] uint8[] pixels);
-       [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h", instance_pos = -0.9)]
-       public delegate bool PixbufSaveFunc ([CCode (array_length_type = "gsize")] uint8[] buf) throws GLib.Error;
+       [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", instance_pos = 2.9)]
+       [Version (since = "2.4")]
+       public delegate bool PixbufSaveFunc ([CCode (array_length_cname = "count", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] buf, out GLib.Error error);
        [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cname = "GDK_PIXBUF_FEATURES_H")]
        public const int PIXBUF_FEATURES_H;
        [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cname = "GDK_PIXBUF_MAGIC_NUMBER")]
index df3c079022087d1db3ee6f153f4a21cd7c210d60..64a610b59a9f992710097252fd2c6d4fefd5ca5e 100644 (file)
@@ -9,7 +9,4 @@ namespace Gdk {
                [Version (deprecated = true, deprecated_since = "2.32")]
                public static Gdk.Pixbuf from_pixdata (Gdk.Pixdata pixdata, bool copy_pixels = true) throws GLib.Error;
        }
-
-       [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h", instance_pos = -0.9)]
-       public delegate bool PixbufSaveFunc ([CCode (array_length_type = "gsize")] uint8[] buf) throws GLib.Error;
 }
index d8eb9217448f7f6cfd393a619ba44705584d0ad3..e73ab0b241b224d62e2fcd130f11ab6f5c3b5eaf 100644 (file)
@@ -26,4 +26,5 @@ Pixbuf
         .new_from_data.destroy_fn default=GLib.free
 
 // Bug #666798: delegates which throw exceptions
-PixbufSaveFunc skip
+// Issue #728: Support non-default error parameter position
+PixbufSaveFunc.error out unowned=false