summaryrefslogtreecommitdiff
path: root/gobject
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2009-01-10 14:25:40 +0000
committerJürg Billeter <juergbi@src.gnome.org>2009-01-10 14:25:40 +0000
commit7920115d1e32d8004040f8a9294190738f39ad33 (patch)
tree669c606ed1042038b534978be3815b13747f0734 /gobject
parent62105a45123d50b17ed0a5390b9472a0e5afdefe (diff)
downloadvala-7920115d1e32d8004040f8a9294190738f39ad33.tar.gz
Replace `#' in property declarations by `owned' modifier before `get'
2009-01-10 Jürg Billeter <j@bitron.ch> * vala/valacodewriter.vala: * vala/valagenieparser.vala: * vala/valamemberaccess.vala: * vala/valaparser.vala: * vala/valapropertyaccessor.vala: * vala/valasemanticanalyzer.vala: * gobject/valaccodebasemodule.vala: * gobject/valaccodememberaccessmodule.vala: * vapigen/valagidlparser.vala: * vapigen/valagirparser.vala: Replace `#' in property declarations by `owned' modifier before `get' svn path=/trunk/; revision=2323
Diffstat (limited to 'gobject')
-rw-r--r--gobject/valaccodebasemodule.vala9
-rw-r--r--gobject/valaccodememberaccessmodule.vala2
2 files changed, 4 insertions, 7 deletions
diff --git a/gobject/valaccodebasemodule.vala b/gobject/valaccodebasemodule.vala
index cd179a4e8..b8de1e695 100644
--- a/gobject/valaccodebasemodule.vala
+++ b/gobject/valaccodebasemodule.vala
@@ -1123,14 +1123,11 @@ public class Vala.CCodeBaseModule : CCodeModule {
this_type = new ObjectType ((Interface) t);
}
var cselfparam = new CCodeFormalParameter ("self", this_type.get_cname ());
- var value_type = prop.property_type.copy ();
CCodeFormalParameter cvalueparam;
if (returns_real_struct) {
- cvalueparam = new CCodeFormalParameter ("value", value_type.get_cname () + "*");
+ cvalueparam = new CCodeFormalParameter ("value", acc.value_type.get_cname () + "*");
} else {
- // property setters never take ownership
- value_type.value_owned = false;
- cvalueparam = new CCodeFormalParameter ("value", value_type.get_cname ());
+ cvalueparam = new CCodeFormalParameter ("value", acc.value_type.get_cname ());
}
if (prop.is_abstract || prop.is_virtual) {
@@ -1217,7 +1214,7 @@ public class Vala.CCodeBaseModule : CCodeModule {
if (acc.writable || acc.construction || returns_real_struct) {
function = new CCodeFunction (cname, "void");
} else {
- function = new CCodeFunction (cname, prop.property_type.get_cname ());
+ function = new CCodeFunction (cname, acc.value_type.get_cname ());
}
ObjectType base_type = null;
diff --git a/gobject/valaccodememberaccessmodule.vala b/gobject/valaccodememberaccessmodule.vala
index c1737b4b0..7f902ac0d 100644
--- a/gobject/valaccodememberaccessmodule.vala
+++ b/gobject/valaccodememberaccessmodule.vala
@@ -206,7 +206,7 @@ public class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
// The value is returned by out parameter
if (base_property.property_type.is_real_struct_type ()) {
var ccomma = new CCodeCommaExpression ();
- var temp_var = get_temp_variable (base_property.property_type);
+ var temp_var = get_temp_variable (base_property.get_accessor.value_type);
var ctemp = new CCodeIdentifier (temp_var.name);
temp_vars.add (temp_var);
ccall.add_argument (new CCodeUnaryExpression(CCodeUnaryOperator.ADDRESS_OF, ctemp));