Commit 38b4bfc6 authored by Luca Bruno's avatar Luca Bruno Committed by Jürg Billeter

Support abstract/virtual delegate properties with target

Fixes bug 623888.
parent 3b68bb5b
......@@ -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));
......
......@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment