[vala] Support CCode type attribute for parameters of creation methods



commit 32a2497d6b9d24b802e20317b20fb7f8cc9c4595
Author: Jürg Billeter <j bitron ch>
Date:   Fri Sep 25 20:37:14 2009 +0200

    Support CCode type attribute for parameters of creation methods

 codegen/valaccodebasemodule.vala |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index b7e1655..e12e2bc 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -3649,6 +3649,10 @@ internal class Vala.CCodeBaseModule : CCodeModule {
 						}
 
 						cexpr = handle_struct_argument (param, arg, cexpr);
+
+						if (param.ctype != null) {
+							cexpr = new CCodeCastExpression (cexpr, param.ctype);
+						}
 					}
 
 					arg_pos = get_param_pos (param.cparameter_position, ellipsis);



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