GMemoryInputStream/GMemoryOutputStream: fix bug in previous commit
authorDan Winship <danw@gnome.org>
Thu, 1 Dec 2011 12:10:25 +0000 (13:10 +0100)
committerDan Winship <danw@gnome.org>
Thu, 1 Dec 2011 12:10:25 +0000 (13:10 +0100)
commite79834958718725493029a61c62f3faf6a4d039c
tree88ff2734632a9f254332563dc9ab59ef36b16741
parenta5876e5fc1b1e192e8cde664780957798b8a2607
GMemoryInputStream/GMemoryOutputStream: fix bug in previous commit

A g_input_stream_read_async() implementation can't call
g_input_stream_read() on itself directly because it will fail because
the pending flag is already set. So fix that by invoking the vmethod
directly rather than calling the wrapper. Likewise with
GMemoryOutputStream.

Add a test to gio/tests/memory-input-stream.c to catch read_async
failures in the future.
gio/gmemoryinputstream.c
gio/gmemoryoutputstream.c
gio/tests/memory-input-stream.c