diff options
author | Jürg Billeter <j@bitron.ch> | 2009-01-03 17:45:49 +0000 |
---|---|---|
committer | Jürg Billeter <juergbi@src.gnome.org> | 2009-01-03 17:45:49 +0000 |
commit | 9d26848882d600634d31c6eaeece5084989cdc45 (patch) | |
tree | 0e41661860934bd168f7dcc799a3210bf9348afb /gobject | |
parent | dd6fed155511f2758f38f7399f620cd1e7da07db (diff) | |
download | vala-9d26848882d600634d31c6eaeece5084989cdc45.tar.gz |
Add array_length_cname attribute for fields, patch by Andreas Brauchli,
2009-01-03 Jürg Billeter <j@bitron.ch>
* vala/valafield.vala:
* gobject/valaccodearraymodule.vala:
Add array_length_cname attribute for fields,
patch by Andreas Brauchli, fixes bug 565793
svn path=/trunk/; revision=2260
Diffstat (limited to 'gobject')
-rw-r--r-- | gobject/valaccodearraymodule.vala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gobject/valaccodearraymodule.vala b/gobject/valaccodearraymodule.vala index 20ffe2338..d846d4a5f 100644 --- a/gobject/valaccodearraymodule.vala +++ b/gobject/valaccodearraymodule.vala @@ -175,7 +175,12 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule { var cl = field.parent_symbol as Class; bool is_gtypeinstance = (cl != null && !cl.is_compact); - var length_cname = get_array_length_cname (field.name, dim); + string length_cname; + if (field.has_array_length_cname) { + length_cname = field.get_array_length_cname (); + } else { + length_cname = get_array_length_cname (field.name, dim); + } CCodeExpression typed_inst = (CCodeExpression) get_ccodenode (ma.inner); CCodeExpression inst; |