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

add array length argument when passing null as array argument, fixes bug

2007-08-21  Juerg Billeter  <j@bitron.ch>

	* gobject/valacodegeneratorinvocationexpression.vala: add array length
	  argument when passing null as array argument, fixes bug 467903

svn path=/trunk/; revision=496
parent 89eb22d6
2007-08-21 Jürg Billeter <j@bitron.ch>
* gobject/valacodegeneratorinvocationexpression.vala: add array length
argument when passing null as array argument, fixes bug 467903
2007-08-21 Jürg Billeter <j@bitron.ch>
* gee/Makefile.am, vala/Makefile.am, ccode/Makefile.am,
......
......@@ -227,15 +227,14 @@ public class Vala.CodeGenerator {
ellipsis = param.ellipsis;
if (!ellipsis) {
if (param.type_reference.data_type != null
&& param.type_reference.data_type.is_reference_type ()
&& arg.static_type.data_type != null) {
&& param.type_reference.data_type.is_reference_type ()) {
if (!param.no_array_length && param.type_reference.data_type is Array) {
var arr = (Array) param.type_reference.data_type;
for (int dim = 1; dim <= arr.rank; dim++) {
ccall.add_argument (get_array_length_cexpression (arg, dim));
}
}
if (param.type_reference.data_type != arg.static_type.data_type) {
if (arg.static_type.data_type != null && param.type_reference.data_type != arg.static_type.data_type) {
// FIXME: use C cast if debugging disabled
var ccall = new CCodeFunctionCall (new CCodeIdentifier (param.type_reference.data_type.get_upper_case_cname (null)));
ccall.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