[vala/0.10: 10/38] Support abstract/virtual delegate properties with target
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.10: 10/38] Support abstract/virtual delegate properties with target
- Date: Sat, 4 Sep 2010 15:02:15 +0000 (UTC)
commit 040591b48eb4df3be6e9368609606649ff1d7711
Author: Luca Bruno <lethalman88 gmail com>
Date: Fri Aug 20 09:56:01 2010 +0200
Support abstract/virtual delegate properties with target
Fixes bug 623888.
codegen/valaccodebasemodule.vala | 4 ++++
codegen/valagtypemodule.vala | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 0356c54..c3ac328 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -1521,6 +1521,8 @@ public class Vala.CCodeBaseModule : CodeGenerator {
var len_expr = new CCodeIdentifier (get_array_length_cname ("result", dim));
vcall.add_argument (len_expr);
}
+ } else if ((acc.value_type is DelegateType) && ((DelegateType) acc.value_type).delegate_symbol.has_target) {
+ vcall.add_argument (new CCodeIdentifier (get_delegate_target_cname ("result")));
}
block.add_statement (new CCodeReturnStatement (vcall));
@@ -1537,6 +1539,8 @@ public class Vala.CCodeBaseModule : CodeGenerator {
var len_expr = new CCodeIdentifier (get_array_length_cname ("value", dim));
vcall.add_argument (len_expr);
}
+ } else if ((acc.value_type is DelegateType) && ((DelegateType) acc.value_type).delegate_symbol.has_target) {
+ vcall.add_argument (new CCodeIdentifier (get_delegate_target_cname ("value")));
}
block.add_statement (new CCodeExpressionStatement (vcall));
diff --git a/codegen/valagtypemodule.vala b/codegen/valagtypemodule.vala
index c989a39..054fdef 100644
--- a/codegen/valagtypemodule.vala
+++ b/codegen/valagtypemodule.vala
@@ -266,6 +266,8 @@ public class Vala.GTypeModule : GErrorModule {
for (int dim = 1; dim <= array_type.rank; dim++) {
vdeclarator.add_parameter (new CCodeFormalParameter (get_array_length_cname ("result", dim), "int*"));
}
+ } else if ((prop.property_type is DelegateType) && ((DelegateType) prop.property_type).delegate_symbol.has_target) {
+ vdeclarator.add_parameter (new CCodeFormalParameter (get_delegate_target_cname ("result"), "gpointer*"));
}
var vdecl = new CCodeDeclaration (creturn_type);
@@ -289,6 +291,8 @@ public class Vala.GTypeModule : GErrorModule {
for (int dim = 1; dim <= array_type.rank; dim++) {
vdeclarator.add_parameter (new CCodeFormalParameter (get_array_length_cname ("value", dim), "int"));
}
+ } else if ((prop.property_type is DelegateType) && ((DelegateType) prop.property_type).delegate_symbol.has_target) {
+ vdeclarator.add_parameter (new CCodeFormalParameter (get_delegate_target_cname ("value"), "gpointer"));
}
var vdecl = new CCodeDeclaration ("void");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]