vala r1306 - in trunk: . vala vapigen
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1306 - in trunk: . vala vapigen
- Date: Wed, 23 Apr 2008 12:20:24 +0100 (BST)
Author: juergbi
Date: Wed Apr 23 11:20:24 2008
New Revision: 1306
URL: http://svn.gnome.org/viewvc/vala?rev=1306&view=rev
Log:
2008-04-23 Juerg Billeter <j bitron ch>
* vala/valaenum.vala:
* vapigen/valagidlparser.vala:
Add support for delegate_target_pos metadata attribute
Modified:
trunk/ChangeLog
trunk/vala/valaenum.vala
trunk/vapigen/valagidlparser.vala
Modified: trunk/vala/valaenum.vala
==============================================================================
--- trunk/vala/valaenum.vala (original)
+++ trunk/vala/valaenum.vala Wed Apr 23 11:20:24 2008
@@ -179,7 +179,7 @@
*
* @param cprefix the prefix to be used in C code
*/
- public void set_cprefix (string cprefix) {
+ public void set_cprefix (string? cprefix) {
this.cprefix = cprefix;
}
Modified: trunk/vapigen/valagidlparser.vala
==============================================================================
--- trunk/vapigen/valagidlparser.vala (original)
+++ trunk/vapigen/valagidlparser.vala Wed Apr 23 11:20:24 2008
@@ -314,6 +314,9 @@
if (param_name == "string") {
// avoid conflict with string type
param_name = "str";
+ } else if (param_name == "self") {
+ // avoid conflict with delegate target
+ param_name = "_self";
}
ParameterDirection direction;
@@ -1334,6 +1337,8 @@
bool show_param = false;
bool set_array_length_pos = false;
double array_length_pos = 0;
+ bool set_delegate_target_pos = false;
+ double delegate_target_pos = 0;
var attributes = get_attributes ("%s.%s".printf (symbol, param_node.name));
if (attributes != null) {
foreach (string attr in attributes) {
@@ -1372,6 +1377,9 @@
} else if (nv[0] == "array_length_pos") {
set_array_length_pos = true;
array_length_pos = eval (nv[1]).to_double ();
+ } else if (nv[0] == "delegate_target_pos") {
+ set_delegate_target_pos = true;
+ delegate_target_pos = eval (nv[1]).to_double ();
} else if (nv[0] == "type_name") {
((UnresolvedType) param_type).unresolved_symbol = new UnresolvedSymbol (null, eval (nv[1]));
} else if (nv[0] == "type_arguments") {
@@ -1404,6 +1412,9 @@
if (set_array_length_pos) {
p.carray_length_parameter_position = array_length_pos;
}
+ if (set_delegate_target_pos) {
+ p.cdelegate_target_parameter_position = delegate_target_pos;
+ }
}
last_param = p;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]