gio: add GBytes-based input/output stream methods
authorDan Winship <danw@gnome.org>
Thu, 5 Apr 2012 13:19:17 +0000 (09:19 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Thu, 24 May 2012 21:48:13 +0000 (17:48 -0400)
commit800d6ff1115b27bf0e9cce818a0511048e2f1cc5
tree9a21b4249c754e761b6f13db93ccd9e50be4eb6e
parent4b456635e422ea620bfb3feeddac12a7045bd43b
gio: add GBytes-based input/output stream methods

Using a caller-supplied buffer for g_input_stream_read() doesn't
translate well to the semantics of many other languages, and using a
non-refcounted buffer for read_async() and write_async() makes it
impossible to manage the memory correctly currently in
garbage-collected languages.

Fix both of these issues by adding a new set of methods that work with
GBytes objects rather than plain buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=671139
docs/reference/gio/gio-sections.txt
gio/ginputstream.c
gio/ginputstream.h
gio/gio.symbols
gio/goutputstream.c
gio/goutputstream.h
gio/tests/memory-input-stream.c
gio/tests/memory-output-stream.c