[vala/wip/attributes: 41/121] Drop cinstance_parameter_position from code nodes
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/attributes: 41/121] Drop cinstance_parameter_position from code nodes
- Date: Mon, 4 Jul 2011 17:12:12 +0000 (UTC)
commit cbaab9377e9d07597fc3e0c35aecbbc9b1a5276a
Author: Luca Bruno <lucabru src gnome org>
Date: Wed Jun 29 11:42:51 2011 +0200
Drop cinstance_parameter_position from code nodes
vala/valaarrayresizemethod.vala | 1 -
vala/valadelegate.vala | 9 ---------
vala/valagirparser.vala | 2 +-
vala/valamethod.vala | 8 --------
vala/valastruct.vala | 1 +
vapigen/valagidlparser.vala | 2 +-
6 files changed, 3 insertions(+), 20 deletions(-)
---
diff --git a/vala/valaarrayresizemethod.vala b/vala/valaarrayresizemethod.vala
index ff9bc61..6afee41 100644
--- a/vala/valaarrayresizemethod.vala
+++ b/vala/valaarrayresizemethod.vala
@@ -34,6 +34,5 @@ public class Vala.ArrayResizeMethod : Method {
public ArrayResizeMethod (SourceReference source_reference) {
base ("resize", new VoidType (), source_reference);
external = true;
- cinstance_parameter_position = 0.1;
}
}
diff --git a/vala/valadelegate.vala b/vala/valadelegate.vala
index dd021f2..9a4ed75 100644
--- a/vala/valadelegate.vala
+++ b/vala/valadelegate.vala
@@ -47,11 +47,6 @@ public class Vala.Delegate : TypeSymbol {
public DataType? sender_type { get; set; }
/**
- * Specifies the position of the instance parameter in the C function.
- */
- public double cinstance_parameter_position { get; set; }
-
- /**
* Specifies the position of the array length out parameter in the C
* function.
*/
@@ -99,7 +94,6 @@ public class Vala.Delegate : TypeSymbol {
this.return_type = return_type;
// error is -1 (right of user_data)
- cinstance_parameter_position = -2;
carray_length_parameter_position = -3;
cdelegate_target_parameter_position = -3;
}
@@ -286,9 +280,6 @@ public class Vala.Delegate : TypeSymbol {
if (a.has_argument ("has_target")) {
has_target = a.get_bool ("has_target");
}
- if (a.has_argument ("instance_pos")) {
- cinstance_parameter_position = a.get_double ("instance_pos");
- }
if (a.has_argument ("array_length")) {
no_array_length = !a.get_bool ("array_length");
}
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 1234225..82186ea 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -2908,7 +2908,7 @@ public class Vala.GirParser : CodeVisitor {
if (s is Delegate && info.closure_idx == i) {
var d = (Delegate) s;
d.has_target = true;
- d.cinstance_parameter_position = (float) j - 0.1;
+ d.set_attribute_double ("CCode", "instance_pos", j - 0.1);
info.keep = false;
} else if (info.keep
&& !node.array_length_parameters.contains (i)
diff --git a/vala/valamethod.vala b/vala/valamethod.vala
index b5e12f6..a8aee05 100644
--- a/vala/valamethod.vala
+++ b/vala/valamethod.vala
@@ -148,11 +148,6 @@ public class Vala.Method : Subroutine {
public Parameter this_parameter { get; set; }
/**
- * Specifies the position of the instance parameter in the C function.
- */
- public double cinstance_parameter_position { get; set; }
-
- /**
* Specifies the position of the array length out parameter in the C
* function.
*/
@@ -436,9 +431,6 @@ public class Vala.Method : Subroutine {
if (a.has_argument ("sentinel")) {
this.sentinel = a.get_string ("sentinel");
}
- if (a.has_argument ("instance_pos")) {
- cinstance_parameter_position = a.get_double ("instance_pos");
- }
if (a.has_argument ("array_length")) {
no_array_length = !a.get_bool ("array_length");
}
diff --git a/vala/valastruct.vala b/vala/valastruct.vala
index 154f570..80a6a51 100644
--- a/vala/valastruct.vala
+++ b/vala/valastruct.vala
@@ -718,6 +718,7 @@ public class Vala.Struct : TypeSymbol {
*/
public void set_simple_type () {
add_attribute ("SimpleType");
+ simple_type = true;
}
public override void replace_type (DataType old_type, DataType new_type) {
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index a31f0f3..9adde5a 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -501,7 +501,7 @@ public class Vala.GIdlParser : CodeVisitor {
} else if (nv[0] == "type_arguments") {
parse_type_arguments_from_string (return_type, eval (nv[1]));
} else if (nv[0] == "instance_pos") {
- cb.cinstance_parameter_position = double.parse (eval (nv[1]));
+ cb.set_attribute_double ("CCode", "instance_pos", double.parse (eval (nv[1])));
} else if (nv[0] == "type_parameters") {
foreach (string type_param_name in eval (nv[1]).split (",")) {
cb.add_type_parameter (new TypeParameter (type_param_name, current_source_reference));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]