[vala] GAsync: Fix uncaught error's return statement
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Subject: [vala] GAsync: Fix uncaught error's return statement
- Date: Fri, 3 Jul 2009 14:45:11 +0000 (UTC)
commit 1151c7c22ec6c36ded031c68e8349c69d4831244
Author: Didier 'Ptitjes <ptitjes free fr>
Date: Tue Jun 9 11:19:49 2009 +0200
GAsync: Fix uncaught error's return statement
FALSE must be returned in coroutines, independent of the return
type.
Signed-off-by: Didier 'Ptitjes <ptitjes free fr>
codegen/valagerrormodule.vala | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valagerrormodule.vala b/codegen/valagerrormodule.vala
index ee93a09..b8ba1a1 100644
--- a/codegen/valagerrormodule.vala
+++ b/codegen/valagerrormodule.vala
@@ -151,6 +151,8 @@ internal class Vala.GErrorModule : CCodeDelegateModule {
if (current_method is CreationMethod) {
cerror_block.add_statement (new CCodeReturnStatement (new CCodeConstant ("NULL")));
+ } else if (current_method.coroutine) {
+ cerror_block.add_statement (new CCodeReturnStatement (new CCodeConstant ("FALSE")));
} else if (current_return_type is VoidType) {
cerror_block.add_statement (new CCodeReturnStatement ());
} else if (current_return_type != null) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]