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

use const types where appropriate, fixes bug 428393

2007-04-18  Jürg Billeter  <j@bitron.ch>

	* vala/valacodegenerator.vala: use const types where appropriate,
	  fixes bug 428393

svn path=/trunk/; revision=286
parent 69a4386f
2007-04-18 Jürg Billeter <j@bitron.ch>
* vala/valacodegenerator.vala: use const types where appropriate,
fixes bug 428393
2007-04-18 Jürg Billeter <j@bitron.ch> 2007-04-18 Jürg Billeter <j@bitron.ch>
* vala/valacodegenerator.vala: simplify unref expression for non-null * vala/valacodegenerator.vala: simplify unref expression for non-null
......
...@@ -1640,7 +1640,7 @@ public class Vala.CodeGenerator : CodeVisitor { ...@@ -1640,7 +1640,7 @@ public class Vala.CodeGenerator : CodeVisitor {
public override void visit_formal_parameter (FormalParameter! p) { public override void visit_formal_parameter (FormalParameter! p) {
if (!p.ellipsis) { if (!p.ellipsis) {
p.ccodenode = new CCodeFormalParameter (p.name, p.type_reference.get_cname ()); p.ccodenode = new CCodeFormalParameter (p.name, p.type_reference.get_cname (false, !p.type_reference.takes_ownership));
} }
} }
...@@ -2118,7 +2118,7 @@ public class Vala.CodeGenerator : CodeVisitor { ...@@ -2118,7 +2118,7 @@ public class Vala.CodeGenerator : CodeVisitor {
var cfrag = new CCodeFragment (); var cfrag = new CCodeFragment ();
foreach (VariableDeclarator decl in stmt.declaration.get_variable_declarators ()) { foreach (VariableDeclarator decl in stmt.declaration.get_variable_declarators ()) {
var cdecl = new CCodeDeclaration (decl.type_reference.get_cname ()); var cdecl = new CCodeDeclaration (decl.type_reference.get_cname (false, !decl.type_reference.takes_ownership));
cdecl.add_declarator ((CCodeVariableDeclarator) decl.ccodenode); cdecl.add_declarator ((CCodeVariableDeclarator) decl.ccodenode);
......
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