mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +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;
|
||||
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),
|
||||
callback,
|
||||
user_data,
|
||||
@ -383,7 +383,7 @@ g_memory_input_stream_skip_async (GInputStream *stream,
|
||||
GSimpleAsyncResult *simple;
|
||||
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),
|
||||
callback,
|
||||
user_data,
|
||||
|
@ -622,11 +622,11 @@ g_memory_output_stream_write_async (GOutputStream *stream,
|
||||
GSimpleAsyncResult *simple;
|
||||
gssize nwritten;
|
||||
|
||||
nwritten = g_memory_output_stream_write (stream,
|
||||
buffer,
|
||||
count,
|
||||
cancellable,
|
||||
NULL);
|
||||
nwritten = g_output_stream_write (stream,
|
||||
buffer,
|
||||
count,
|
||||
cancellable,
|
||||
NULL);
|
||||
|
||||
simple = g_simple_async_result_new (G_OBJECT (stream),
|
||||
callback,
|
||||
|
Loading…
Reference in New Issue
Block a user