diff options
author | Jürg Billeter <j@bitron.ch> | 2011-04-08 21:21:11 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2011-04-08 21:34:05 +0200 |
commit | 2a3f71d2bbed0c1be6075e4d59b5ecfb342ed3a4 (patch) | |
tree | ff94adb8d2c3c211c493aaf1776cf935769084b7 /vala | |
parent | ad14bf8355f9f5cbc74cb7781a8d72257888f532 (diff) | |
download | vala-2a3f71d2bbed0c1be6075e4d59b5ecfb342ed3a4.tar.gz |
dova: Convert Array to struct
Diffstat (limited to 'vala')
-rw-r--r-- | vala/valaarraytype.vala | 10 | ||||
-rw-r--r-- | vala/valadeletestatement.vala | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/vala/valaarraytype.vala b/vala/valaarraytype.vala index 5ed4ff683..ed284105f 100644 --- a/vala/valaarraytype.vala +++ b/vala/valaarraytype.vala @@ -1,6 +1,6 @@ /* valaarraytype.vala * - * Copyright (C) 2007-2010 Jürg Billeter + * Copyright (C) 2007-2011 Jürg Billeter * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -66,9 +66,7 @@ public class Vala.ArrayType : ReferenceType { } public override Symbol? get_member (string member_name) { - if (CodeContext.get ().profile == Profile.DOVA) { - return SemanticAnalyzer.symbol_lookup_inherited (CodeContext.get ().root.scope.lookup ("Dova").scope.lookup ("Array"), member_name); - } else if (member_name == "length") { + if (member_name == "length") { return get_length_field (); } else if (member_name == "move") { return get_move_method (); @@ -155,7 +153,7 @@ public class Vala.ArrayType : ReferenceType { return element_type.get_cname (); } else { if (CodeContext.get ().profile == Profile.DOVA) { - return "DovaArray*"; + return "DovaArray"; } else { return element_type.get_cname () + "*"; } @@ -271,6 +269,8 @@ public class Vala.ArrayType : ReferenceType { public override bool is_disposable () { if (fixed_length) { return element_type.is_disposable (); + } else if (CodeContext.get ().profile == Profile.DOVA) { + return false; } else { return base.is_disposable (); } diff --git a/vala/valadeletestatement.vala b/vala/valadeletestatement.vala index bb8da3922..056b31765 100644 --- a/vala/valadeletestatement.vala +++ b/vala/valadeletestatement.vala @@ -1,6 +1,6 @@ /* valadeletestatement.vala * - * Copyright (C) 2008-2010 Jürg Billeter + * Copyright (C) 2008-2011 Jürg Billeter * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -54,7 +54,7 @@ public class Vala.DeleteStatement : CodeNode, Statement { return false; } - if (!(expression.value_type is PointerType)) { + if (!(expression.value_type is PointerType) && !(expression.value_type is ArrayType)) { error = true; Report.error (source_reference, "delete operator not supported for `%s'".printf (expression.value_type.to_string ())); } |