[vala] codegen: Fix create_type_check_statement when result is a SimpleType struct



commit ccac9ca8c0d9b39401685c0ca7e2c1ae127a1308
Author: Luca Bruno <lucabru src gnome org>
Date:   Tue Aug 30 09:43:53 2011 +0200

    codegen: Fix create_type_check_statement when result is a SimpleType struct

 codegen/valagtypemodule.vala |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valagtypemodule.vala b/codegen/valagtypemodule.vala
index f366c35..273f6a1 100644
--- a/codegen/valagtypemodule.vala
+++ b/codegen/valagtypemodule.vala
@@ -2176,6 +2176,8 @@ public class Vala.GTypeModule : GErrorModule {
 			var cdefault = default_value_for_type (ret_type, false);
 			if (cdefault != null) {
 				ccheck.add_argument (cdefault);
+			} else if (ret_type.data_type is Struct && ((Struct) ret_type.data_type).is_simple_type ()) {
+				ccheck.add_argument (new CCodeIdentifier ("result"));
 			} else {
 				return;
 			}



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