Commit f0e08776 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

don't use InstanceCast for callbacks

2006-10-03  Jürg Billeter  <j@bitron.ch>

	* vala/valacodegenerator.vala: don't use InstanceCast for callbacks

svn path=/trunk/; revision=138
parent 489dc9ea
2006-10-03 Jürg Billeter <j@bitron.ch>
* vala/valacodegenerator.vala: don't use InstanceCast for callbacks
2006-09-28 Raffaele Sandrini <rasa@gmx.ch> 2006-09-28 Raffaele Sandrini <rasa@gmx.ch>
* vala/valacodegenerator.vala, vala/valasemanticanalyzer.vala, * vala/valacodegenerator.vala, vala/valasemanticanalyzer.vala,
vala/valamemorymanager.vala: add one dimensional array assignment vala/valamemorymanager.vala: add one dimensional array assignment
support support
......
...@@ -2602,11 +2602,11 @@ public class Vala.CodeGenerator : CodeVisitor { ...@@ -2602,11 +2602,11 @@ public class Vala.CodeGenerator : CodeVisitor {
} }
public override void visit_cast_expression (CastExpression! expr) { public override void visit_cast_expression (CastExpression! expr) {
if (expr.type_reference.data_type is Struct || expr.type_reference.data_type is Enum || expr.type_reference.data_type is Flags) { if (expr.type_reference.data_type is Class || expr.type_reference.data_type is Interface) {
expr.ccodenode = new CCodeCastExpression ((CCodeExpression) expr.inner.ccodenode, expr.type_reference.get_cname ());
} else {
// GObject cast // GObject cast
expr.ccodenode = new InstanceCast ((CCodeExpression) expr.inner.ccodenode, expr.type_reference.data_type); expr.ccodenode = new InstanceCast ((CCodeExpression) expr.inner.ccodenode, expr.type_reference.data_type);
} else {
expr.ccodenode = new CCodeCastExpression ((CCodeExpression) expr.inner.ccodenode, expr.type_reference.get_cname ());
} }
visit_expression (expr); visit_expression (expr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment