]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
fix `var' with pointer types, fixes bug 527779
authorJuerg Billeter <j@bitron.ch>
Mon, 12 May 2008 15:26:33 +0000 (15:26 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Mon, 12 May 2008 15:26:33 +0000 (15:26 +0000)
2008-05-12  Juerg Billeter  <j@bitron.ch>

* gobject/valaccodegenerator.vala: fix `var' with pointer types,
fixes bug 527779

svn path=/trunk/; revision=1375

ChangeLog
vala/valasemanticanalyzer.vala

index 2dbbefc970412fd68a85914f97d270431f362dfb..0f2172d790b45d9a7298e34792e64ed982a45ae8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-12  Jürg Billeter  <j@bitron.ch>
+
+       * gobject/valaccodegenerator.vala: fix `var' with pointer types,
+       fixes bug 527779
+
 2008-05-12  Jürg Billeter  <j@bitron.ch>
 
        * vapi/glib-2.0.vapi:
index d23e294e65763656a92f0f9af8e8844a1117d850..a629292f1778db0b263fb9a02b77bbd3b77d032c 100644 (file)
@@ -816,6 +816,10 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
                        local.variable_type = local.initializer.static_type.copy ();
                        local.variable_type.takes_ownership = (local.variable_type.data_type == null || local.variable_type.data_type.is_reference_type ());
                        local.variable_type.transfers_ownership = false;
+
+                       if (local.variable_type is PointerType) {
+                               local.variable_type.takes_ownership = false;
+                       }
                }
 
                if (local.initializer != null) {