vala r1325 - in trunk: . gobject
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1325 - in trunk: . gobject
- Date: Sat, 26 Apr 2008 21:33:19 +0100 (BST)
Author: juergbi
Date: Sat Apr 26 20:33:19 2008
New Revision: 1325
URL: http://svn.gnome.org/viewvc/vala?rev=1325&view=rev
Log:
2008-04-26 Juerg Billeter <j bitron ch>
* gobject/valaccodegenerator.vala:
Fix crash when using abstract properties
Modified:
trunk/ChangeLog
trunk/gobject/valaccodegenerator.vala
Modified: trunk/gobject/valaccodegenerator.vala
==============================================================================
--- trunk/gobject/valaccodegenerator.vala (original)
+++ trunk/gobject/valaccodegenerator.vala Sat Apr 26 20:33:19 2008
@@ -778,6 +778,9 @@
this_type = new InterfaceInstanceType ((Interface) t);
}
var cselfparam = new CCodeFormalParameter ("self", this_type.get_cname ());
+ var value_type = prop.type_reference.copy ();
+ value_type.takes_ownership = value_type.transfers_ownership;
+ var cvalueparam = new CCodeFormalParameter ("value", value_type.get_cname ());
if (prop.is_abstract || prop.is_virtual) {
if (acc.readable) {
@@ -787,7 +790,6 @@
}
function.add_parameter (cselfparam);
if (acc.writable || acc.construction) {
- var cvalueparam = new CCodeFormalParameter ("value", acc.value_parameter.type_reference.get_cname ());
function.add_parameter (cvalueparam);
}
@@ -882,7 +884,6 @@
function.add_parameter (coutparam);
} else {
if (acc.writable || acc.construction) {
- var cvalueparam = new CCodeFormalParameter ("value", acc.value_parameter.type_reference.get_cname ());
function.add_parameter (cvalueparam);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]