From d557085924f89b2afe830b11cfbb1ffe4df55441 Mon Sep 17 00:00:00 2001 From: Anton Gorenko Date: Tue, 30 Aug 2011 22:12:42 +0600 Subject: [PATCH] gdk.pixbuf: workaround for an incorrect return-value in .gir for gdk_pixbuf_get_pixels (fixes #61); --- basis/gdk/pixbuf/ffi/ffi.factor | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/basis/gdk/pixbuf/ffi/ffi.factor b/basis/gdk/pixbuf/ffi/ffi.factor index 79c9cb8a35..d60da8fbc0 100644 --- a/basis/gdk/pixbuf/ffi/ffi.factor +++ b/basis/gdk/pixbuf/ffi/ffi.factor @@ -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 +! + : data>GInputStream ( data -- GInputStream ) [ malloc-byte-array &free ] [ length ] bi f g_memory_input_stream_new_from_data ;