Constant arrays don't own their elements
authorJamie McCracken <jamiemcc@gnome.org>
Tue, 17 Jun 2008 01:11:47 +0000 (01:11 +0000)
committerJamie McCracken <jamiemcc@src.gnome.org>
Tue, 17 Jun 2008 01:11:47 +0000 (01:11 +0000)
2008-06-16  Jamie McCracken  <jamiemcc@gnome.org>

* vala/valagenieparser.vala:

Constant arrays don't own their elements

svn path=/trunk/; revision=1607

ChangeLog
vala/valagenieparser.vala

index ee0b65c..79d9670 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,12 @@
 
        * vala/valagenieparser.vala:
 
+       Constant arrays don't own their elements
+
+2008-06-16  Jamie McCracken  <jamiemcc@gnome.org>
+
+       * vala/valagenieparser.vala:
+
        Add support for overriding default method handlers of signals
        that have been declared with the `virtual' modifier
 
index 439045b..a29d35b 100644 (file)
@@ -2512,6 +2512,12 @@ public class Vala.Genie.Parser : CodeVisitor {
                }
                expect_terminator ();
 
+               // constant arrays don't own their element
+               var array_type = type as ArrayType;
+               if (array_type != null) {
+                       array_type.element_type.value_owned = false;
+               }
+
                var c = new Constant (id, type, initializer, get_src_com (begin));
                c.access = get_access (id);
                set_attributes (c, attrs);