diff options
author | Kjell Ahlstedt <kjell.ahlstedt@bredband.net> | 2016-06-02 09:02:25 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjell.ahlstedt@bredband.net> | 2016-06-02 09:02:25 +0200 |
commit | 8b1ed0c3aa9ee79a69d08888de57f32254245e9b (patch) | |
tree | b390596ba6d4287219a016ecab44648722173c31 /gio | |
parent | 71d272a1926260ad3ee8abd38875066b139801b8 (diff) | |
download | glibmm-8b1ed0c3aa9ee79a69d08888de57f32254245e9b.tar.gz |
Gio::Pollable[Input|Output]Stream: Return -1 on error in vfuncs
* gio/src/pollableinputstream.hg: read_nonblocking_vfunc_callback():
Return -1 if the C++ vfunc throws an exception.
* gio/src/pollableoutputstream.hg: write_nonblocking_vfunc_callback():
Return -1 if the C++ vfunc throws an exception.
This is what the glib/gio functions expect, and the behaviour suggested in
bug 572471 for similar vfuncs in other stream classes.
Diffstat (limited to 'gio')
-rw-r--r-- | gio/src/pollableinputstream.hg | 4 | ||||
-rw-r--r-- | gio/src/pollableoutputstream.hg | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/gio/src/pollableinputstream.hg b/gio/src/pollableinputstream.hg index ce4af171..b1c31788 100644 --- a/gio/src/pollableinputstream.hg +++ b/gio/src/pollableinputstream.hg @@ -1,5 +1,3 @@ -// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*- - /* Copyright (C) 2012 The giomm Development Team * * This library is free software; you can redistribute it and/or @@ -59,7 +57,7 @@ public: //TODO: _WRAP_VFUNC(Glib::RefPtr<Source> create_source(const Glib::RefPtr<Cancellable>& cancellable), "create_source") - _WRAP_VFUNC(gssize read_nonblocking(void* buffer, gsize count), "read_nonblocking", errthrow) + _WRAP_VFUNC(gssize read_nonblocking(void* buffer, gsize count), "read_nonblocking", errthrow, err_return_value -1) }; } // namespace Gio diff --git a/gio/src/pollableoutputstream.hg b/gio/src/pollableoutputstream.hg index c6807c58..c735fc68 100644 --- a/gio/src/pollableoutputstream.hg +++ b/gio/src/pollableoutputstream.hg @@ -1,5 +1,3 @@ -// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*- - /* Copyright (C) 2012 The giomm Development Team * * This library is free software; you can redistribute it and/or @@ -60,7 +58,7 @@ public: //TODO:_WRAP_VFUNC(Glib::RefPtr<Source> create_source(const Glib::RefPtr<Cancellable>& cancellable), "create_source") - _WRAP_VFUNC(gssize write_nonblocking(const void* buffer, gsize count), "write_nonblocking", errthrow) + _WRAP_VFUNC(gssize write_nonblocking(const void* buffer, gsize count), "write_nonblocking", errthrow, err_return_value -1) }; } // namespace Gio |