vala r2081 - in trunk: . gobject
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r2081 - in trunk: . gobject
- Date: Fri, 28 Nov 2008 21:39:15 +0000 (UTC)
Author: juergbi
Date: Fri Nov 28 21:39:15 2008
New Revision: 2081
URL: http://svn.gnome.org/viewvc/vala?rev=2081&view=rev
Log:
2008-11-28 JÃrg Billeter <j bitron ch>
* gobject/valaccodebasemodule.vala:
Fix generated code in struct destroy function for array fields
Modified:
trunk/ChangeLog
trunk/gobject/valaccodebasemodule.vala
Modified: trunk/gobject/valaccodebasemodule.vala
==============================================================================
--- trunk/gobject/valaccodebasemodule.vala (original)
+++ trunk/gobject/valaccodebasemodule.vala Fri Nov 28 21:39:15 2008
@@ -854,7 +854,14 @@
if (requires_destroy (f.field_type) && instance_finalize_fragment != null) {
var this_access = new MemberAccess.simple ("this");
this_access.value_type = get_data_type_for_symbol ((TypeSymbol) f.parent_symbol);
- this_access.ccodenode = new CCodeIdentifier ("self");
+
+ var st = f.parent_symbol as Struct;
+ if (st != null && !st.is_simple_type ()) {
+ this_access.ccodenode = new CCodeIdentifier ("(*self)");
+ } else {
+ this_access.ccodenode = new CCodeIdentifier ("self");
+ }
+
var ma = new MemberAccess (this_access, f.name);
ma.symbol_reference = f;
instance_finalize_fragment.append (new CCodeExpressionStatement (get_unref_expression (lhs, f.field_type, ma)));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]