[vala/wip/array-length-type: 9/10] girwriter: Remove hardcoded "int" length type and use ArrayType.length_type
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/array-length-type: 9/10] girwriter: Remove hardcoded "int" length type and use ArrayType.length_type
- Date: Fri, 2 Nov 2018 13:25:18 +0000 (UTC)
commit 54841543d926621d547e811ea9d3a1995f146682
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Oct 31 17:12:50 2018 +0100
girwriter: Remove hardcoded "int" length type and use ArrayType.length_type
codegen/valagirwriter.vala | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala
index cab520ac6..834396cf2 100644
--- a/codegen/valagirwriter.vala
+++ b/codegen/valagirwriter.vala
@@ -831,9 +831,8 @@ public class Vala.GIRWriter : CodeVisitor {
private void write_implicit_params (DataType? type, ref int index, bool has_array_length, string?
name, ParameterDirection direction) {
if (type is ArrayType && has_array_length) {
- var int_type = new IntegerType (context.root.scope.lookup ("int") as Struct);
for (var i = 0; i < ((ArrayType) type).rank; i++) {
- write_param_or_return (int_type, true, ref index, has_array_length,
"%s_length%i".printf (name, i + 1), null, direction);
+ write_param_or_return (((ArrayType) type).length_type, true, ref index,
has_array_length, "%s_length%i".printf (name, i + 1), null, direction);
}
} else if (type is DelegateType) {
var deleg_type = (DelegateType) type;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]