summaryrefslogtreecommitdiff
path: root/gio/gbufferedinputstream.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2012-05-10 09:00:45 -0400
committerDan Winship <danw@gnome.org>2012-07-10 10:49:14 -0400
commitf8532a13e2054e649f75ca2a58e01604be05549e (patch)
treec7e24a95e32e9ab944bcf9f172bd937af466cc42 /gio/gbufferedinputstream.c
parent538b2f106de78b7dfeac2a98f3d5594ed0ed2ade (diff)
gio: Add g_async_result_legacy_propagate_error()
Finish deprecating the "handle GSimpleAsyncResult errors in the wrapper function" idiom (and protect against future GSimpleAsyncResult deprecation warnings) by adding a "legacy" GAsyncResult method to do it in those classes/methods where it had been traditionally done. (This applies only to wrapper methods; in cases where an _async vmethod explicitly uses GSimpleAsyncResult, its corresponding _finish vmethod still uses g_simple_async_result_propagate_error.) https://bugzilla.gnome.org/show_bug.cgi?id=667375 https://bugzilla.gnome.org/show_bug.cgi?id=661767
Diffstat (limited to 'gio/gbufferedinputstream.c')
-rw-r--r--gio/gbufferedinputstream.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gio/gbufferedinputstream.c b/gio/gbufferedinputstream.c
index 139199de9..b8e1b11eb 100644
--- a/gio/gbufferedinputstream.c
+++ b/gio/gbufferedinputstream.c
@@ -548,11 +548,12 @@ g_buffered_input_stream_fill_finish (GBufferedInputStream *stream,
g_return_val_if_fail (G_IS_BUFFERED_INPUT_STREAM (stream), -1);
g_return_val_if_fail (G_IS_ASYNC_RESULT (result), -1);
+ if (g_async_result_legacy_propagate_error (result, error))
+ return -1;
+
if (G_IS_SIMPLE_ASYNC_RESULT (result))
{
simple = G_SIMPLE_ASYNC_RESULT (result);
- if (g_simple_async_result_propagate_error (simple, error))
- return -1;
/* Special case read of 0 bytes */
if (g_simple_async_result_get_source_tag (simple) == g_buffered_input_stream_fill_async)