From: Luca Bruno Date: Mon, 16 Aug 2010 20:06:25 +0000 (+0200) Subject: Honor array_length_type when generating method parameters X-Git-Tag: 0.9.8~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=148c07f9233e6fcdc787c95984e15fd9500f8557;p=thirdparty%2Fvala.git Honor array_length_type when generating method parameters Based on patch by Sam Thursfield, fixes bug 621830. --- diff --git a/codegen/valaccodearraymodule.vala b/codegen/valaccodearraymodule.vala index d0966e6d9..2eebca776 100644 --- a/codegen/valaccodearraymodule.vala +++ b/codegen/valaccodearraymodule.vala @@ -1023,9 +1023,12 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule { } if (!param.no_array_length) { - var length_ctype = "int"; + string length_ctype = "int"; + if (param.array_length_type != null) { + length_ctype = param.array_length_type; + } if (param.direction != ParameterDirection.IN) { - length_ctype = "int*"; + length_ctype = "%s*".printf (length_ctype); } for (int dim = 1; dim <= array_type.rank; dim++) {