[vala] Honor array_length_type when generating method parameters



commit fd18a73821d71a077449d4429d539a66da60a172
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]