[vala/0.10] Honor array_length_type when generating method parameters
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.10] Honor array_length_type when generating method parameters
- Date: Fri, 20 Aug 2010 08:25:10 +0000 (UTC)
commit 148c07f9233e6fcdc787c95984e15fd9500f8557
Author: Luca Bruno <lethalman88 gmail com>
Date: Mon Aug 16 22:06:25 2010 +0200
Honor array_length_type when generating method parameters
Based on patch by Sam Thursfield, fixes bug 621830.
codegen/valaccodearraymodule.vala | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/codegen/valaccodearraymodule.vala b/codegen/valaccodearraymodule.vala
index d0966e6..2eebca7 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++) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]