if (param.variable_type is ArrayType) {
var array_type = (ArrayType) param.variable_type;
+ var length_ctype = get_ccode_array_length_type (array_type);
for (int dim = 1; dim <= array_type.rank; dim++) {
string length_cname = get_parameter_array_length_cname (param, dim);
- ccode.add_declaration ("int", new CCodeVariableDeclarator (length_cname, new CCodeConstant ("0")));
+ ccode.add_declaration (length_ctype, new CCodeVariableDeclarator (length_cname, new CCodeConstant ("0")));
ccall.add_argument (new CCodeIdentifier (length_cname));
}
}
ccode.add_declaration (get_ccode_name (param.variable_type), new CCodeVariableDeclarator.zero ("_vala_%s".printf (param.name), default_value_for_type (param.variable_type, true)));
var array_type = param.variable_type as ArrayType;
+ var length_ctype = get_ccode_array_length_type (array_type);
if (array_type != null) {
for (int dim = 1; dim <= array_type.rank; dim++) {
- ccode.add_declaration ("int", new CCodeVariableDeclarator ("_vala_%s_length%d".printf (param.name, dim), new CCodeConstant ("0")));
+ ccode.add_declaration (length_ctype, new CCodeVariableDeclarator ("_vala_%s_length%d".printf (param.name, dim), new CCodeConstant ("0")));
}
}
ccode.add_declaration (get_ccode_name (m.return_type), new CCodeVariableDeclarator.zero ("_result", default_value_for_type (m.return_type, true)));
var array_type = m.return_type as ArrayType;
+ var length_ctype = get_ccode_array_length_type (array_type);
if (array_type != null) {
for (int dim = 1; dim <= array_type.rank; dim++) {
- ccode.add_declaration ("int", new CCodeVariableDeclarator ("_result_length%d".printf (dim), new CCodeConstant ("0")));
+ ccode.add_declaration (length_ctype, new CCodeVariableDeclarator ("_result_length%d".printf (dim), new CCodeConstant ("0")));
}
}
function.add_parameter (new CCodeParameter ("result", "%s*".printf (get_ccode_name (prop.get_accessor.value_type))));
} else {
if (array_type != null) {
+ var length_ctype = get_ccode_array_length_type (array_type) + "*";
for (int dim = 1; dim <= array_type.rank; dim++) {
- function.add_parameter (new CCodeParameter ("result_length%d".printf (dim), "int*"));
+ function.add_parameter (new CCodeParameter ("result_length%d".printf (dim), length_ctype));
}
}
ccode.add_assignment (new CCodeIdentifier ("_result"), new CCodeIdentifier("_inner_reply"));
} else {
if (array_type != null) {
+ var length_ctype = get_ccode_array_length_type (array_type);
for (int dim = 1; dim <= array_type.rank; dim++) {
- ccode.add_declaration ("int", new CCodeVariableDeclarator ("_result_length%d".printf (dim), new CCodeConstant ("0")));
+ ccode.add_declaration (length_ctype, new CCodeVariableDeclarator ("_result_length%d".printf (dim), new CCodeConstant ("0")));
}
}
function.add_parameter (new CCodeParameter ("value", get_ccode_name (prop.set_accessor.value_type)));
if (array_type != null) {
+ var length_ctype = get_ccode_array_length_type (array_type);
for (int dim = 1; dim <= array_type.rank; dim++) {
- function.add_parameter (new CCodeParameter ("value_length%d".printf (dim), "int"));
+ function.add_parameter (new CCodeParameter ("value_length%d".printf (dim), length_ctype));
}
}
}
}
var array_type = param.variable_type as ArrayType;
+ var length_ctype = get_ccode_array_length_type (array_type);
if (array_type != null) {
for (int dim = 1; dim <= array_type.rank; dim++) {
string length_cname = get_parameter_array_length_cname (param, dim);
if (ready_data_struct != null) {
- ready_data_struct.add_field ("int", length_cname);
+ ready_data_struct.add_field (length_ctype, length_cname);
} else {
- ccode.add_declaration ("int", new CCodeVariableDeclarator.zero (length_cname, new CCodeConstant ("0")));
+ ccode.add_declaration (length_ctype, new CCodeVariableDeclarator.zero (length_cname, new CCodeConstant ("0")));
}
}
}
var array_type = param.variable_type as ArrayType;
if (array_type != null) {
+ var length_ctype = get_ccode_array_length_type (array_type);
for (int dim = 1; dim <= array_type.rank; dim++) {
string length_cname = get_parameter_array_length_cname (param, dim);
- ccode.add_declaration ("int", new CCodeVariableDeclarator.zero (length_cname, new CCodeConstant ("0")));
+ ccode.add_declaration (length_ctype, new CCodeVariableDeclarator.zero (length_cname, new CCodeConstant ("0")));
}
}
var array_type = m.return_type as ArrayType;
if (array_type != null) {
+ var length_ctype = get_ccode_array_length_type (array_type);
for (int dim = 1; dim <= array_type.rank; dim++) {
string length_cname = get_array_length_cname ("result", dim);
- ccode.add_declaration ("int", new CCodeVariableDeclarator.zero (length_cname, new CCodeConstant ("0")));
+ ccode.add_declaration (length_ctype, new CCodeVariableDeclarator.zero (length_cname, new CCodeConstant ("0")));
}
}
function.add_parameter (cparam);
if (param.variable_type is ArrayType) {
var array_type = (ArrayType) param.variable_type;
+ var length_ctype = get_ccode_array_length_type (array_type);
for (int dim = 1; dim <= array_type.rank; dim++) {
- function.add_parameter (new CCodeParameter (get_parameter_array_length_cname (param, dim), "int"));
+ function.add_parameter (new CCodeParameter (get_parameter_array_length_cname (param, dim), length_ctype));
}
}
}
var array_type = prop.get_accessor.value_type as ArrayType;
if (array_type != null) {
+ var length_ctype = get_ccode_array_length_type (array_type);
for (int dim = 1; dim <= array_type.rank; dim++) {
string length_cname = get_array_length_cname ("result", dim);
- ccode.add_declaration ("int", new CCodeVariableDeclarator.zero (length_cname, new CCodeConstant ("0")));
+ ccode.add_declaration (length_ctype, new CCodeVariableDeclarator.zero (length_cname, new CCodeConstant ("0")));
ccall.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier (length_cname)));
}
}
var array_type = prop.property_type as ArrayType;
if (array_type != null) {
+ var length_ctype = get_ccode_array_length_type (array_type);
for (int dim = 1; dim <= array_type.rank; dim++) {
- ccode.add_declaration ("int", new CCodeVariableDeclarator (get_array_length_cname ("value", dim)));
+ ccode.add_declaration (length_ctype, new CCodeVariableDeclarator (get_array_length_cname ("value", dim)));
ccall.add_argument (new CCodeIdentifier (get_array_length_cname ("value", dim)));
}
}