]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
fix struct instance methods, fixes bug 529183
authorJuerg Billeter <j@bitron.ch>
Mon, 21 Apr 2008 19:13:51 +0000 (19:13 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Mon, 21 Apr 2008 19:13:51 +0000 (19:13 +0000)
2008-04-21  Juerg Billeter  <j@bitron.ch>

* gobject/valaccodeinvocationexpressionbinding.vala: fix struct
  instance methods, fixes bug 529183

svn path=/trunk/; revision=1292

ChangeLog
gobject/valaccodeinvocationexpressionbinding.vala

index 8a690bf641a192b1c5d8102d24cadec2aa527050..87fd8510f15df6ca19ce05d419316477316b3146 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-21  Jürg Billeter  <j@bitron.ch>
+
+       * gobject/valaccodeinvocationexpressionbinding.vala: fix struct
+         instance methods, fixes bug 529183
+
 2008-04-21  Jürg Billeter  <j@bitron.ch>
 
        * vala/valasemanticanalyzer.vala: allow assigning construct-only
index 8da52f370941a113b194ba98fc83b9fb9ec51934..d70e29dd96cd980ba150ee9adc8f3554239cd584 100644 (file)
@@ -90,8 +90,10 @@ public class Vala.CCodeInvocationExpressionBinding : CCodeExpressionBinding {
                                instance_expression_type = ma.inner.static_type;
                        }
 
-                       if (instance_expression_type.data_type is Struct && !((Struct) instance_expression_type.data_type).is_simple_type () && instance_expression_type.data_type != codegen.current_type_symbol) {
-                               if (instance is CCodeIdentifier) {
+                       if (instance_expression_type.data_type is Struct
+                           && !((Struct) instance_expression_type.data_type).is_simple_type ()
+                           && instance_expression_type.data_type != codegen.current_type_symbol) {
+                               if (instance is CCodeIdentifier || instance is CCodeMemberAccess) {
                                        instance = new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, instance);
                                } else {
                                        // if instance is e.g. a function call, we can't take the address of the expression