Re: [Vala] 0.01 * dim?



Hi Yu,

On Thu, 2008-05-01 at 20:46 -0400, Yu Feng wrote:
This line at "valaccodeinvocationexpressionbinding.vala":330 surprised
me a lot:

codegen.temp_vars.insert (0, temp_var);
carg_map.set (codegen.get_param_pos (m.carray_length_parameter_position + 0.01 * dim), new 
CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, temp_ref));
expr.append_array_size (temp_ref);


Why is it a '0.01 * dim'?

The position of C function parameters is not always straight forward
when taking implicit parameters, like array lengths of multi-dimensional
arrays, into account. We use doubles to calculate the right ordering.

Jürg




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]