From: Juerg Billeter Date: Mon, 14 Apr 2008 21:55:36 +0000 (+0000) Subject: set transfers_ownership of delegate return type X-Git-Tag: VALA_0_3_1~67 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bea4aff79b1afb865f032706cd2872748bbf4c6e;p=platform%2Fupstream%2Fvala.git set transfers_ownership of delegate return type 2008-04-14 Juerg Billeter * vala/valaparser.vala: set transfers_ownership of delegate return type svn path=/trunk/; revision=1235 --- diff --git a/ChangeLog b/ChangeLog index 52be042..d720cff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-04-14 Jürg Billeter + * vala/valaparser.vala: set transfers_ownership of delegate + return type + +2008-04-14 Jürg Billeter + * vapi/libxml-2.0.vapi: update for use with non-null types, patch by Andreas Brauchli diff --git a/vala/valaparser.vala b/vala/valaparser.vala index 7bf0c4b..1d98b66 100644 --- a/vala/valaparser.vala +++ b/vala/valaparser.vala @@ -2567,6 +2567,10 @@ public class Vala.Parser : CodeVisitor { var flags = parse_member_declaration_modifiers (); expect (TokenType.DELEGATE); var type = parse_type (); + var unresolved_type = type as UnresolvedType; + if (unresolved_type != null && !unresolved_type.is_weak) { + unresolved_type.transfers_ownership = true; + } var sym = parse_symbol_name (); var type_param_list = parse_type_parameter_list (); var d = context.create_delegate (sym.name, type, get_src_com (begin));