vala r1610 - in trunk: . vapigen
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1610 - in trunk: . vapigen
- Date: Tue, 17 Jun 2008 21:12:06 +0000 (UTC)
Author: juergbi
Date: Tue Jun 17 21:12:06 2008
New Revision: 1610
URL: http://svn.gnome.org/viewvc/vala?rev=1610&view=rev
Log:
2008-06-17 JÃrg Billeter <j bitron ch>
* vapigen/valagidlparser.vala:
Allow transformation of implicit array parameters to out or ref
parameters
Modified:
trunk/ChangeLog
trunk/vapigen/valagidlparser.vala
Modified: trunk/vapigen/valagidlparser.vala
==============================================================================
--- trunk/vapigen/valagidlparser.vala (original)
+++ trunk/vapigen/valagidlparser.vala Tue Jun 17 21:12:06 2008
@@ -1381,6 +1381,7 @@
double array_length_pos = 0;
bool set_delegate_target_pos = false;
double delegate_target_pos = 0;
+ bool array_requested = false;
var attributes = get_attributes ("%s.%s".printf (symbol, param_node.name));
if (attributes != null) {
foreach (string attr in attributes) {
@@ -1390,14 +1391,25 @@
param_type = new ArrayType (param_type, 1, param_type.source_reference);
p.parameter_type = param_type;
p.direction = ParameterDirection.IN;
+ array_requested = true;
}
} else if (nv[0] == "is_out") {
if (eval (nv[1]) == "1") {
p.direction = ParameterDirection.OUT;
+ if (!array_requested && param_type is ArrayType) {
+ var array_type = (ArrayType) param_type;
+ param_type = array_type.element_type;
+ p.parameter_type = param_type;
+ }
}
} else if (nv[0] == "is_ref") {
if (eval (nv[1]) == "1") {
p.direction = ParameterDirection.REF;
+ if (!array_requested && param_type is ArrayType) {
+ var array_type = (ArrayType) param_type;
+ param_type = array_type.element_type;
+ p.parameter_type = param_type;
+ }
}
} else if (nv[0] == "nullable") {
if (eval (nv[1]) == "1") {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]