[vala] GAsync: Remove unused result variable from coroutines



commit 5173c4db510c5aa2975de1c7d92d1d483313ff16
Author: Jürg Billeter <j bitron ch>
Date:   Fri Jul 3 16:42:09 2009 +0100

    GAsync: Remove unused result variable from coroutines

 codegen/valaccodemethodmodule.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valaccodemethodmodule.vala b/codegen/valaccodemethodmodule.vala
index 7c1d8c7..36ec078 100644
--- a/codegen/valaccodemethodmodule.vala
+++ b/codegen/valaccodemethodmodule.vala
@@ -431,7 +431,7 @@ internal class Vala.CCodeMethodModule : CCodeStructModule {
 					}
 				}
 
-				if (!(m.return_type is VoidType)) {
+				if (!(m.return_type is VoidType) && !m.coroutine) {
 					var cdecl = new CCodeDeclaration (m.return_type.get_cname ());
 					cdecl.add_declarator (new CCodeVariableDeclarator ("result"));
 					cinit.append (cdecl);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]