GNOME Bugzilla – Bug 621915
Add a way to bind g_input_stream_read
Last modified: 2012-06-25 08:41:47 UTC
We need a way to say the number of bytes to allocate. i.e: array-length=count. Also probably would be needed to say the type of the buffer as it is void *. Probably it should be uint8
I think that API should be considered as a convenience API for C callers. The attached test assumes that alternative API will be added.
Created attachment 185778 [details] Add test for Gio.Stream.read_async
IRC comments: <nacho> walters, around? * jrb has quit (Ping timeout: 600 seconds) <walters> yep <nacho> walters, https://bugzilla.gnome.org/show_bug.cgi?id=621915 <- you think it would be possible with introspection? <nacho> or the only way is to have a data handling method <walters> yeah, that one i just don't have a good answer for <walters> well <walters> it should be possible to pass a native language byte array as regular input <walters> however the language would have to know/handle the underlying memory being modified <nacho> yeah <walters> which might be a problem for anything with a JIT
I would have needed this to use in Totem's opensubtitles.org plugin. In the meanwhile, it'll stay broken.
With today's versions, GI still does not allow introspecting this, so confirming for 3.2.0. If this API is really needed in Python still, it's probably better to add a binding friendly API to GLib.
the new GIO API from http://git.gnome.org/browse/glib/commit/?id=800d6ff1115b27bf0e9cce818a0511048e2f1cc5 should solve this or I'm wrong? Also bug #669306 it's the other way "output" and should be solved to by the same commit.
I agree, duplicating. *** This bug has been marked as a duplicate of bug 671139 ***