mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 22:46:15 +01:00
GMemoryInputStream/GMemoryOutputStream: make these properly subclassable
The async methods were directly invoking their own implementations of the sync methods, making it impossible for a subclass to reimplement them. https://bugzilla.gnome.org/show_bug.cgi?id=664635
This commit is contained in:
parent
b13e79da62
commit
a5876e5fc1
@ -347,7 +347,7 @@ g_memory_input_stream_read_async (GInputStream *stream,
|
|||||||
GSimpleAsyncResult *simple;
|
GSimpleAsyncResult *simple;
|
||||||
gssize nread;
|
gssize nread;
|
||||||
|
|
||||||
nread = g_memory_input_stream_read (stream, buffer, count, cancellable, NULL);
|
nread = g_input_stream_read (stream, buffer, count, cancellable, NULL);
|
||||||
simple = g_simple_async_result_new (G_OBJECT (stream),
|
simple = g_simple_async_result_new (G_OBJECT (stream),
|
||||||
callback,
|
callback,
|
||||||
user_data,
|
user_data,
|
||||||
@ -383,7 +383,7 @@ g_memory_input_stream_skip_async (GInputStream *stream,
|
|||||||
GSimpleAsyncResult *simple;
|
GSimpleAsyncResult *simple;
|
||||||
gssize nskipped;
|
gssize nskipped;
|
||||||
|
|
||||||
nskipped = g_memory_input_stream_skip (stream, count, cancellable, NULL);
|
nskipped = g_input_stream_skip (stream, count, cancellable, NULL);
|
||||||
simple = g_simple_async_result_new (G_OBJECT (stream),
|
simple = g_simple_async_result_new (G_OBJECT (stream),
|
||||||
callback,
|
callback,
|
||||||
user_data,
|
user_data,
|
||||||
|
@ -622,11 +622,11 @@ g_memory_output_stream_write_async (GOutputStream *stream,
|
|||||||
GSimpleAsyncResult *simple;
|
GSimpleAsyncResult *simple;
|
||||||
gssize nwritten;
|
gssize nwritten;
|
||||||
|
|
||||||
nwritten = g_memory_output_stream_write (stream,
|
nwritten = g_output_stream_write (stream,
|
||||||
buffer,
|
buffer,
|
||||||
count,
|
count,
|
||||||
cancellable,
|
cancellable,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
simple = g_simple_async_result_new (G_OBJECT (stream),
|
simple = g_simple_async_result_new (G_OBJECT (stream),
|
||||||
callback,
|
callback,
|
||||||
|
Loading…
Reference in New Issue
Block a user