[vala] dova: Fix code generated for instance casts
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] dova: Fix code generated for instance casts
- Date: Sun, 18 Jul 2010 14:00:13 +0000 (UTC)
commit 2ca04f3fe3ab240e44308ff20394084ecde5d1e3
Author: Jürg Billeter <j bitron ch>
Date: Sun Jul 18 11:32:54 2010 +0200
dova: Fix code generated for instance casts
codegen/valadovabasemodule.vala | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/codegen/valadovabasemodule.vala b/codegen/valadovabasemodule.vala
index b180c7f..f8f4eab 100644
--- a/codegen/valadovabasemodule.vala
+++ b/codegen/valadovabasemodule.vala
@@ -2482,9 +2482,7 @@ internal class Vala.DovaBaseModule : CCodeModule {
return null;
}
- public CCodeFunctionCall generate_instance_cast (CCodeExpression expr, TypeSymbol type) {
- var result = new CCodeFunctionCall (new CCodeIdentifier (type.get_upper_case_cname (null)));
- result.add_argument (expr);
- return result;
+ public CCodeExpression generate_instance_cast (CCodeExpression expr, TypeSymbol type) {
+ return new CCodeCastExpression (expr, type.get_cname () + "*");
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]