Tue Feb 28 09:44:23 CET 2006 Paolo Molaro <lupus@ximian.com>

* gdk/Pixbuf.custom: use correct type for buffer_size in
	gdk_pixbuf_save_to_bufferv() (fixes bug# 77662).


svn path=/trunk/gtk-sharp/; revision=57385
This commit is contained in:
Paolo Molaro 2006-02-28 08:45:31 +00:00
parent c1288db722
commit 3e6a941186
2 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,9 @@
Tue Feb 28 09:44:23 CET 2006 Paolo Molaro <lupus@ximian.com>
* gdk/Pixbuf.custom: use correct type for buffer_size in
gdk_pixbuf_save_to_bufferv() (fixes bug# 77662).
2005-02-16 Mike Kestner <mkestner@novell.com> 2005-02-16 Mike Kestner <mkestner@novell.com>
* sample/gnomevfs/Makefile.am : make TestXfer conditional to a mono * sample/gnomevfs/Makefile.am : make TestXfer conditional to a mono

View file

@ -259,7 +259,7 @@
static extern void g_free (IntPtr raw); static extern void g_free (IntPtr raw);
[DllImport("libgdk_pixbuf-2.0-0.dll")] [DllImport("libgdk_pixbuf-2.0-0.dll")]
static extern unsafe bool gdk_pixbuf_save_to_bufferv (IntPtr raw, out IntPtr buffer, out uint buffer_size, IntPtr type, IntPtr[] option_keys, IntPtr[] option_values, out IntPtr error); static extern unsafe bool gdk_pixbuf_save_to_bufferv (IntPtr raw, out IntPtr buffer, out IntPtr buffer_size, IntPtr type, IntPtr[] option_keys, IntPtr[] option_values, out IntPtr error);
IntPtr[] NullTerm (string[] src) IntPtr[] NullTerm (string[] src)
{ {
@ -289,7 +289,7 @@
{ {
IntPtr error = IntPtr.Zero; IntPtr error = IntPtr.Zero;
IntPtr buffer; IntPtr buffer;
uint buffer_size; IntPtr buffer_size;
IntPtr ntype = GLib.Marshaller.StringToPtrGStrdup (type); IntPtr ntype = GLib.Marshaller.StringToPtrGStrdup (type);
IntPtr[] nkeys = NullTerm (option_keys); IntPtr[] nkeys = NullTerm (option_keys);
IntPtr[] nvals = NullTerm (option_values); IntPtr[] nvals = NullTerm (option_values);
@ -300,7 +300,7 @@
if (!saved) if (!saved)
throw new GLib.GException (error); throw new GLib.GException (error);
byte[] result = new byte [buffer_size]; byte[] result = new byte [(int)buffer_size];
Marshal.Copy (buffer, result, 0, (int) buffer_size); Marshal.Copy (buffer, result, 0, (int) buffer_size);
g_free (buffer); g_free (buffer);
return result; return result;