Commit ad79334d authored by Mathias Hasselmann's avatar Mathias Hasselmann Committed by Mathias Hasselmann
Browse files

terminate array initializer with NULL sentinal to make destructors like

2007-08-18  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gobject/valacodegenerator.vala: terminate array initializer
	with NULL sentinal to make destructors like g_strfreev happy

svn path=/trunk/; revision=481
parent 203385e1
2007-08-18 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gobject/valacodegenerator.vala: terminate array initializer
with NULL sentinal to make destructors like g_strfreev happy
2007-08-18 Mathias Hasselmann <mathias.hasselmann@gmx.de> 2007-08-18 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* vapi/Makefile.am: erm, well.. also should install enchant.vala * vapi/Makefile.am: erm, well.. also should install enchant.vala
......
...@@ -1860,11 +1860,13 @@ public class Vala.CodeGenerator : CodeVisitor { ...@@ -1860,11 +1860,13 @@ public class Vala.CodeGenerator : CodeVisitor {
bool first = true; bool first = true;
CCodeExpression cexpr = null; CCodeExpression cexpr = null;
foreach (Expression size in expr.get_sizes ()) { foreach (Expression size in expr.get_sizes ()) {
var csize = new CCodeBinaryExpression (CCodeBinaryOperator.PLUS, (CCodeExpression) size.ccodenode, new CCodeConstant ("1"));
if (first) { if (first) {
cexpr = (CCodeExpression) size.ccodenode; cexpr = csize;
first = false; first = false;
} else { } else {
cexpr = new CCodeBinaryExpression (CCodeBinaryOperator.MUL, cexpr, (CCodeExpression) size.ccodenode); cexpr = new CCodeBinaryExpression (CCodeBinaryOperator.MUL, cexpr, csize);
} }
} }
gnew.add_argument (cexpr); gnew.add_argument (cexpr);
......
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