gdk.pixbuf: workaround for an incorrect return-value in .gir for gdk_pixbuf_get_pixels (fixes #61);

db4
Anton Gorenko 2011-08-30 22:12:42 +06:00
parent 3f0e1ce056
commit d557085924
1 changed files with 12 additions and 3 deletions

View File

@ -1,12 +1,14 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.data alien.libraries alien.syntax
combinators gio.ffi glib.ffi gmodule.ffi gobject-introspection
gobject.ffi kernel libc sequences system vocabs.loader ;
EXCLUDE: alien.c-types => pointer ;
combinators gio.ffi glib.ffi gobject-introspection
gobject-introspection.standard-types kernel libc
sequences system vocabs.loader ;
IN: gdk.pixbuf.ffi
<<
"gio.ffi" require
>>
LIBRARY: gdk.pixbuf
@ -19,6 +21,13 @@ LIBRARY: gdk.pixbuf
GIR: vocab:gdk/pixbuf/GdkPixbuf-2.0.gir
! <workaround incorrect return-value in gir
FORGET: gdk_pixbuf_get_pixels
FUNCTION: guint8* gdk_pixbuf_get_pixels ( GdkPixbuf* pixbuf ) ;
! workaround>
: data>GInputStream ( data -- GInputStream )
[ malloc-byte-array &free ] [ length ] bi
f g_memory_input_stream_new_from_data ;