[vala] Fix virtual methods returning structs



commit b5f1df956aea38d3af1c166f6cffde1329d61175
Author: Jürg Billeter <j bitron ch>
Date:   Wed Dec 23 22:26:38 2009 +0100

    Fix virtual methods returning structs

 codegen/valaccodemethodmodule.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valaccodemethodmodule.vala b/codegen/valaccodemethodmodule.vala
index 748c8aa..ef8c41d 100644
--- a/codegen/valaccodemethodmodule.vala
+++ b/codegen/valaccodemethodmodule.vala
@@ -983,7 +983,7 @@ internal class Vala.CCodeMethodModule : CCodeStructModule {
 		generate_cparameters (m, source_declarations, cparam_map, vfunc, null, carg_map, vcall, direction);
 
 		CCodeStatement cstmt;
-		if (return_type is VoidType) {
+		if (return_type is VoidType || return_type.is_real_non_null_struct_type ()) {
 			cstmt = new CCodeExpressionStatement (vcall);
 		} else if (m.get_postconditions ().size == 0) {
 			/* pass method return value */



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