diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-01-02 14:23:40 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-09-30 09:03:25 +0200 |
commit | 7d317ebfd78bb0e569f277e31b0f4522469b48af (patch) | |
tree | 208fc9a6d55286bf0d4ad51c6e38046263a62b76 | |
parent | 469d043f9c2bb9492392048975809fa4388ca63e (diff) | |
download | vala-7d317ebfd78bb0e569f277e31b0f4522469b48af.tar.gz |
vala: Let methods return an unowned reference to internal collections
Correctly state ownership in documentation since those were never a copy.
35 files changed, 124 insertions, 124 deletions
diff --git a/vala/valaarraycreationexpression.vala b/vala/valaarraycreationexpression.vala index c61e6bee0..841d8db42 100644 --- a/vala/valaarraycreationexpression.vala +++ b/vala/valaarraycreationexpression.vala @@ -92,7 +92,7 @@ public class Vala.ArrayCreationExpression : Expression { /** * Get the sizes for all dimensions ascending from left to right. */ - public List<Expression> get_sizes () { + public unowned List<Expression> get_sizes () { return sizes; } diff --git a/vala/valabasicblock.vala b/vala/valabasicblock.vala index 759bb9ce0..26648aed6 100644 --- a/vala/valabasicblock.vala +++ b/vala/valabasicblock.vala @@ -56,7 +56,7 @@ public class Vala.BasicBlock { nodes.add (node); } - public List<CodeNode> get_nodes () { + public unowned List<CodeNode> get_nodes () { return nodes; } @@ -69,11 +69,11 @@ public class Vala.BasicBlock { } } - public List<weak BasicBlock> get_predecessors () { + public unowned List<weak BasicBlock> get_predecessors () { return predecessors; } - public List<weak BasicBlock> get_successors () { + public unowned List<weak BasicBlock> get_successors () { return successors; } @@ -82,7 +82,7 @@ public class Vala.BasicBlock { block.parent = this; } - public List<weak BasicBlock> get_children () { + public unowned List<weak BasicBlock> get_children () { return children; } @@ -90,7 +90,7 @@ public class Vala.BasicBlock { df.add (block); } - public Set<weak BasicBlock> get_dominator_frontier () { + public unowned Set<weak BasicBlock> get_dominator_frontier () { return df; } @@ -98,7 +98,7 @@ public class Vala.BasicBlock { phi_functions.add (phi); } - public Set<PhiFunction> get_phi_functions () { + public unowned Set<PhiFunction> get_phi_functions () { return phi_functions; } } diff --git a/vala/valablock.vala b/vala/valablock.vala index 7419b5b9d..ae30c8b15 100644 --- a/vala/valablock.vala +++ b/vala/valablock.vala @@ -104,11 +104,11 @@ public class Vala.Block : Symbol, Statement { } /** - * Returns a copy of the list of local variables. + * Returns the list of local variables. * * @return variable declarator list */ - public List<LocalVariable> get_local_variables () { + public unowned List<LocalVariable> get_local_variables () { return local_variables; } @@ -130,7 +130,7 @@ public class Vala.Block : Symbol, Statement { * * @return constants list */ - public List<Constant> get_local_constants () { + public unowned List<Constant> get_local_constants () { return local_constants; } diff --git a/vala/valacallable.vala b/vala/valacallable.vala index 5b29aa9ff..b8bf03632 100644 --- a/vala/valacallable.vala +++ b/vala/valacallable.vala @@ -41,5 +41,5 @@ public interface Vala.Callable : CodeNode { /** * Returns the parameter list. */ - public abstract List<Parameter> get_parameters (); + public abstract unowned List<Parameter> get_parameters (); } diff --git a/vala/valaclass.vala b/vala/valaclass.vala index 933a67c26..c8baeaab7 100644 --- a/vala/valaclass.vala +++ b/vala/valaclass.vala @@ -240,11 +240,11 @@ public class Vala.Class : ObjectTypeSymbol { } /** - * Returns a copy of the base type list. + * Returns the base type list. * * @return list of base types */ - public List<DataType> get_base_types () { + public unowned List<DataType> get_base_types () { return base_types; } diff --git a/vala/valacodecontext.vala b/vala/valacodecontext.vala index 412b20eeb..47c1cede4 100644 --- a/vala/valacodecontext.vala +++ b/vala/valacodecontext.vala @@ -285,20 +285,20 @@ public class Vala.CodeContext { } /** - * Returns a copy of the list of source files. + * Returns the list of source files. * * @return list of source files */ - public List<SourceFile> get_source_files () { + public unowned List<SourceFile> get_source_files () { return source_files; } /** - * Returns a copy of the list of C source files. + * Returns the list of C source files. * * @return list of C source files */ - public List<string> get_c_source_files () { + public unowned List<string> get_c_source_files () { return c_source_files; } @@ -337,11 +337,11 @@ public class Vala.CodeContext { } /** - * Returns a copy of the list of used packages. + * Returns the list of used packages. * * @return list of used packages */ - public List<string> get_packages () { + public unowned List<string> get_packages () { return packages; } diff --git a/vala/valadatatype.vala b/vala/valadatatype.vala index 608178fde..2580eb6e8 100644 --- a/vala/valadatatype.vala +++ b/vala/valadatatype.vala @@ -71,11 +71,11 @@ public abstract class Vala.DataType : CodeNode { } /** - * Returns a copy of the list of generic type arguments. + * Returns the list of generic type arguments. * * @return type argument list */ - public List<DataType> get_type_arguments () { + public unowned List<DataType> get_type_arguments () { if (type_argument_list != null) { return type_argument_list; } @@ -378,11 +378,11 @@ public abstract class Vala.DataType : CodeNode { } /** - * Returns copy of the list of invocation parameters. + * Returns the list of invocation parameters. * * @return parameter list */ - public virtual List<Parameter>? get_parameters () { + public virtual unowned List<Parameter>? get_parameters () { return null; } diff --git a/vala/valadelegate.vala b/vala/valadelegate.vala index 4b4e7074a..813a73479 100644 --- a/vala/valadelegate.vala +++ b/vala/valadelegate.vala @@ -93,7 +93,7 @@ public class Vala.Delegate : TypeSymbol, Callable { scope.add (p.name, p); } - public List<TypeParameter> get_type_parameters () { + public unowned List<TypeParameter> get_type_parameters () { return type_parameters; } @@ -123,11 +123,11 @@ public class Vala.Delegate : TypeSymbol, Callable { } /** - * Return copy of parameter list. + * Return the parameter list. * * @return parameter list */ - public List<Parameter> get_parameters () { + public unowned List<Parameter> get_parameters () { return parameters; } diff --git a/vala/valadelegatetype.vala b/vala/valadelegatetype.vala index 0220b0168..cbf720b8a 100644 --- a/vala/valadelegatetype.vala +++ b/vala/valadelegatetype.vala @@ -43,7 +43,7 @@ public class Vala.DelegateType : CallableType { return delegate_symbol.return_type; } - public override List<Parameter>? get_parameters () { + public override unowned List<Parameter>? get_parameters () { return delegate_symbol.get_parameters (); } diff --git a/vala/valaelementaccess.vala b/vala/valaelementaccess.vala index b847e9515..90c718ff8 100644 --- a/vala/valaelementaccess.vala +++ b/vala/valaelementaccess.vala @@ -53,7 +53,7 @@ public class Vala.ElementAccess : Expression { index.parent_node = this; } - public List<Expression> get_indices () { + public unowned List<Expression> get_indices () { return indices; } diff --git a/vala/valaenum.vala b/vala/valaenum.vala index 508ef12ef..592e6e7a8 100644 --- a/vala/valaenum.vala +++ b/vala/valaenum.vala @@ -103,29 +103,29 @@ public class Vala.Enum : TypeSymbol { } /** - * Returns a copy of the list of enum values. + * Returns the list of enum values. * * @return list of enum values */ - public List<EnumValue> get_values () { + public unowned List<EnumValue> get_values () { return values; } /** - * Returns a copy of the list of methods. + * Returns the list of methods. * * @return list of methods */ - public List<Method> get_methods () { + public unowned List<Method> get_methods () { return methods; } /** - * Returns a copy of the list of constants. + * Returns the list of constants. * * @return list of constants */ - public List<Constant> get_constants () { + public unowned List<Constant> get_constants () { return constants; } diff --git a/vala/valaerrordomain.vala b/vala/valaerrordomain.vala index 0b462849e..311f29975 100644 --- a/vala/valaerrordomain.vala +++ b/vala/valaerrordomain.vala @@ -72,20 +72,20 @@ public class Vala.ErrorDomain : TypeSymbol { } /** - * Returns a copy of the list of error codes. + * Returns the list of error codes. * * @return list of error codes */ - public List<ErrorCode> get_codes () { + public unowned List<ErrorCode> get_codes () { return codes; } /** - * Returns a copy of the list of methods. + * Returns the list of methods. * * @return list of methods */ - public List<Method> get_methods () { + public unowned List<Method> get_methods () { return methods; } diff --git a/vala/valaforstatement.vala b/vala/valaforstatement.vala index aa70cee0b..19501c614 100644 --- a/vala/valaforstatement.vala +++ b/vala/valaforstatement.vala @@ -85,11 +85,11 @@ public class Vala.ForStatement : CodeNode, Statement { } /** - * Returns a copy of the list of initializers. + * Returns the list of initializers. * * @return initializer list */ - public List<Expression> get_initializer () { + public unowned List<Expression> get_initializer () { return initializer; } @@ -104,11 +104,11 @@ public class Vala.ForStatement : CodeNode, Statement { } /** - * Returns a copy of the iterator. + * Returns the iterator. * * @return iterator */ - public List<Expression> get_iterator () { + public unowned List<Expression> get_iterator () { return iterator; } diff --git a/vala/valainitializerlist.vala b/vala/valainitializerlist.vala index a8cdea14d..cdafd0923 100644 --- a/vala/valainitializerlist.vala +++ b/vala/valainitializerlist.vala @@ -41,11 +41,11 @@ public class Vala.InitializerList : Expression { } /** - * Returns a copy of the expression + * Returns the initalizer expression list * * @return expression list */ - public List<Expression> get_initializers () { + public unowned List<Expression> get_initializers () { return initializers; } diff --git a/vala/valainterface.vala b/vala/valainterface.vala index f6c503641..6b715356f 100644 --- a/vala/valainterface.vala +++ b/vala/valainterface.vala @@ -53,11 +53,11 @@ public class Vala.Interface : ObjectTypeSymbol { } /** - * Returns a copy of the base type list. + * Returns the base type list. * * @return list of base types */ - public List<DataType> get_prerequisites () { + public unowned List<DataType> get_prerequisites () { return prerequisites; } diff --git a/vala/valalambdaexpression.vala b/vala/valalambdaexpression.vala index a22497e70..8a930ef61 100644 --- a/vala/valalambdaexpression.vala +++ b/vala/valalambdaexpression.vala @@ -82,11 +82,11 @@ public class Vala.LambdaExpression : Expression { } /** - * Returns copy of parameter list. + * Returns the parameter list. * * @return parameter list */ - public List<Parameter> get_parameters () { + public unowned List<Parameter> get_parameters () { return parameters; } diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala index 132f72d05..fdc336f78 100644 --- a/vala/valamemberaccess.vala +++ b/vala/valamemberaccess.vala @@ -107,11 +107,11 @@ public class Vala.MemberAccess : Expression { } /** - * Returns a copy of the list of generic type arguments. + * Returns the list of generic type arguments. * * @return type argument list */ - public List<DataType> get_type_arguments () { + public unowned List<DataType> get_type_arguments () { return type_argument_list; } diff --git a/vala/valamethod.vala b/vala/valamethod.vala index 29e7171a2..71c3a4787 100644 --- a/vala/valamethod.vala +++ b/vala/valamethod.vala @@ -228,7 +228,7 @@ public class Vala.Method : Subroutine, Callable { scope.add (param.name, param); } - public List<Parameter> get_parameters () { + public unowned List<Parameter> get_parameters () { return parameters; } @@ -451,11 +451,11 @@ public class Vala.Method : Subroutine, Callable { } /** - * Returns a copy of the type parameter list. + * Returns the type parameter list. * * @return list of type parameters */ - public List<TypeParameter> get_type_parameters () { + public unowned List<TypeParameter> get_type_parameters () { if (type_parameters != null) { return type_parameters; } @@ -498,11 +498,11 @@ public class Vala.Method : Subroutine, Callable { } /** - * Returns a copy of the list of preconditions of this method. + * Returns the list of preconditions of this method. * * @return list of preconditions */ - public List<Expression> get_preconditions () { + public unowned List<Expression> get_preconditions () { if (preconditions != null) { return preconditions; } @@ -526,11 +526,11 @@ public class Vala.Method : Subroutine, Callable { } /** - * Returns a copy of the list of postconditions of this method. + * Returns the list of postconditions of this method. * * @return list of postconditions */ - public List<Expression> get_postconditions () { + public unowned List<Expression> get_postconditions () { if (postconditions != null) { return postconditions; } diff --git a/vala/valamethodcall.vala b/vala/valamethodcall.vala index c1b034fa3..0a9d7465a 100644 --- a/vala/valamethodcall.vala +++ b/vala/valamethodcall.vala @@ -75,11 +75,11 @@ public class Vala.MethodCall : Expression { } /** - * Returns a copy of the argument list. + * Returns the argument list. * * @return argument list */ - public List<Expression> get_argument_list () { + public unowned List<Expression> get_argument_list () { return argument_list; } diff --git a/vala/valamethodtype.vala b/vala/valamethodtype.vala index a2effdec6..a10e61b12 100644 --- a/vala/valamethodtype.vala +++ b/vala/valamethodtype.vala @@ -40,7 +40,7 @@ public class Vala.MethodType : CallableType { return method_symbol.return_type; } - public override List<Parameter>? get_parameters () { + public override unowned List<Parameter>? get_parameters () { return method_symbol.get_parameters (); } diff --git a/vala/valanamespace.vala b/vala/valanamespace.vala index c53fda830..a413f07f6 100644 --- a/vala/valanamespace.vala +++ b/vala/valanamespace.vala @@ -68,11 +68,11 @@ public class Vala.Namespace : Symbol { } /** - * Returns a copy of the list of namespaces. + * Returns the list of namespaces. * * @return comment list */ - public List<Comment> get_comments () { + public unowned List<Comment> get_comments () { return comments; } @@ -141,11 +141,11 @@ public class Vala.Namespace : Symbol { } /** - * Returns a copy of the list of namespaces. + * Returns the list of namespaces. * * @return namespace list */ - public List<Namespace> get_namespaces () { + public unowned List<Namespace> get_namespaces () { return namespaces; } @@ -275,83 +275,83 @@ public class Vala.Namespace : Symbol { } /** - * Returns a copy of the list of structs. + * Returns the list of structs. * * @return struct list */ - public List<Struct> get_structs () { + public unowned List<Struct> get_structs () { return structs; } /** - * Returns a copy of the list of classes. + * Returns the list of classes. * * @return class list */ - public List<Class> get_classes () { + public unowned List<Class> get_classes () { return classes; } /** - * Returns a copy of the list of interfaces. + * Returns the list of interfaces. * * @return interface list */ - public List<Interface> get_interfaces () { + public unowned List<Interface> get_interfaces () { return interfaces; } /** - * Returns a copy of the list of enums. + * Returns the list of enums. * * @return enum list */ - public List<Enum> get_enums () { + public unowned List<Enum> get_enums () { return enums; } /** - * Returns a copy of the list of error domains. + * Returns the list of error domains. * * @return error domain list */ - public List<ErrorDomain> get_error_domains () { + public unowned List<ErrorDomain> get_error_domains () { return error_domains; } /** - * Returns a copy of the list of fields. + * Returns the list of fields. * * @return field list */ - public List<Field> get_fields () { + public unowned List<Field> get_fields () { return fields; } /** - * Returns a copy of the list of constants. + * Returns the list of constants. * * @return constant list */ - public List<Constant> get_constants () { + public unowned List<Constant> get_constants () { return constants; } /** - * Returns a copy of the list of delegates. + * Returns the list of delegates. * * @return delegate list */ - public List<Delegate> get_delegates () { + public unowned List<Delegate> get_delegates () { return delegates; } /** - * Returns a copy of the list of methods. + * Returns the list of methods. * * @return method list */ - public List<Method> get_methods () { + public unowned List<Method> get_methods () { return methods; } diff --git a/vala/valaobjectcreationexpression.vala b/vala/valaobjectcreationexpression.vala index 1f6d335fc..19063a9d0 100644 --- a/vala/valaobjectcreationexpression.vala +++ b/vala/valaobjectcreationexpression.vala @@ -85,11 +85,11 @@ public class Vala.ObjectCreationExpression : Expression { } /** - * Returns a copy of the argument list. + * Returns the argument list. * * @return argument list */ - public List<Expression> get_argument_list () { + public unowned List<Expression> get_argument_list () { return argument_list; } @@ -108,7 +108,7 @@ public class Vala.ObjectCreationExpression : Expression { * * @return member initializer list */ - public List<MemberInitializer> get_object_initializer () { + public unowned List<MemberInitializer> get_object_initializer () { return object_initializer; } diff --git a/vala/valaobjecttype.vala b/vala/valaobjecttype.vala index 4683f2081..7e4c2b12d 100644 --- a/vala/valaobjecttype.vala +++ b/vala/valaobjecttype.vala @@ -86,7 +86,7 @@ public class Vala.ObjectType : ReferenceType { } } - public override List<Parameter>? get_parameters () { + public override unowned List<Parameter>? get_parameters () { var cl = type_symbol as Class; if (cl != null && cl.default_construction_method != null) { return cl.default_construction_method.get_parameters (); diff --git a/vala/valaobjecttypesymbol.vala b/vala/valaobjecttypesymbol.vala index ad0de3ffe..c15be3e34 100644 --- a/vala/valaobjecttypesymbol.vala +++ b/vala/valaobjecttypesymbol.vala @@ -56,7 +56,7 @@ public abstract class Vala.ObjectTypeSymbol : TypeSymbol { * * @return list of members */ - public List<Symbol> get_members () { + public unowned List<Symbol> get_members () { return members; } @@ -65,7 +65,7 @@ public abstract class Vala.ObjectTypeSymbol : TypeSymbol { * * @return list of fields */ - public List<Field> get_fields () { + public unowned List<Field> get_fields () { return fields; } @@ -74,7 +74,7 @@ public abstract class Vala.ObjectTypeSymbol : TypeSymbol { * * @return list of methods */ - public List<Method> get_methods () { + public unowned List<Method> get_methods () { return methods; } @@ -83,7 +83,7 @@ public abstract class Vala.ObjectTypeSymbol : TypeSymbol { * * @return list of properties */ - public List<Property> get_properties () { + public unowned List<Property> get_properties () { return properties; } @@ -92,7 +92,7 @@ public abstract class Vala.ObjectTypeSymbol : TypeSymbol { * * @return list of signals */ - public List<Signal> get_signals () { + public unowned List<Signal> get_signals () { return signals; } @@ -152,7 +152,7 @@ public abstract class Vala.ObjectTypeSymbol : TypeSymbol { * * @return list of classes */ - public List<Class> get_classes () { + public unowned List<Class> get_classes () { return classes; } @@ -161,7 +161,7 @@ public abstract class Vala.ObjectTypeSymbol : TypeSymbol { * * @return list of structs */ - public List<Struct> get_structs () { + public unowned List<Struct> get_structs () { return structs; } @@ -170,7 +170,7 @@ public abstract class Vala.ObjectTypeSymbol : TypeSymbol { * * @return list of enums */ - public List<Enum> get_enums () { + public unowned List<Enum> get_enums () { return enums; } @@ -179,7 +179,7 @@ public abstract class Vala.ObjectTypeSymbol : TypeSymbol { * * @return list of delegates */ - public List<Delegate> get_delegates () { + public unowned List<Delegate> get_delegates () { return delegates; } @@ -238,7 +238,7 @@ public abstract class Vala.ObjectTypeSymbol : TypeSymbol { * * @return list of constants */ - public List<Constant> get_constants () { + public unowned List<Constant> get_constants () { return constants; } @@ -253,11 +253,11 @@ public abstract class Vala.ObjectTypeSymbol : TypeSymbol { } /** - * Returns a copy of the type parameter list. + * Returns the type parameter list. * * @return list of type parameters */ - public List<TypeParameter> get_type_parameters () { + public unowned List<TypeParameter> get_type_parameters () { return type_parameters; } diff --git a/vala/valascope.vala b/vala/valascope.vala index a2a946b09..1a59d24ea 100644 --- a/vala/valascope.vala +++ b/vala/valascope.vala @@ -127,7 +127,7 @@ public class Vala.Scope { return false; } - public Map<string,Symbol> get_symbol_table () { + public unowned Map<string,Symbol> get_symbol_table () { return symbol_table; } } diff --git a/vala/valasignal.vala b/vala/valasignal.vala index fa32cbe64..e7caf0bff 100644 --- a/vala/valasignal.vala +++ b/vala/valasignal.vala @@ -92,7 +92,7 @@ public class Vala.Signal : Symbol, Callable { scope.add (param.name, param); } - public List<Parameter> get_parameters () { + public unowned List<Parameter> get_parameters () { return parameters; } diff --git a/vala/valasignaltype.vala b/vala/valasignaltype.vala index f9a67e90c..9f016c1a1 100644 --- a/vala/valasignaltype.vala +++ b/vala/valasignaltype.vala @@ -44,7 +44,7 @@ public class Vala.SignalType : CallableType { return signal_symbol.return_type; } - public override List<Parameter>? get_parameters () { + public override unowned List<Parameter>? get_parameters () { return signal_symbol.get_parameters (); } diff --git a/vala/valasourcefile.vala b/vala/valasourcefile.vala index 4dca01224..2e270a06c 100644 --- a/vala/valasourcefile.vala +++ b/vala/valasourcefile.vala @@ -163,11 +163,11 @@ public class Vala.SourceFile { } /** - * Returns a copy of the list of header comments. + * Returns the list of header comments. * * @return list of comments */ - public List<Comment> get_comments () { + public unowned List<Comment> get_comments () { return comments; } @@ -201,11 +201,11 @@ public class Vala.SourceFile { } /** - * Returns a copy of the list of code nodes. + * Returns the list of code nodes. * * @return code node list */ - public List<CodeNode> get_nodes () { + public unowned List<CodeNode> get_nodes () { return nodes; } diff --git a/vala/valastruct.vala b/vala/valastruct.vala index c96632805..7b8232dba 100644 --- a/vala/valastruct.vala +++ b/vala/valastruct.vala @@ -179,11 +179,11 @@ public class Vala.Struct : TypeSymbol { } /** - * Returns a copy of the type parameter list. + * Returns the type parameter list. * * @return list of type parameters */ - public List<TypeParameter> get_type_parameters () { + public unowned List<TypeParameter> get_type_parameters () { return type_parameters; } @@ -210,20 +210,20 @@ public class Vala.Struct : TypeSymbol { } /** - * Returns a copy of the list of fields. + * Returns the list of fields. * * @return list of fields */ - public List<Field> get_fields () { + public unowned List<Field> get_fields () { return fields; } /** - * Returns a copy of the list of constants. + * Returns the list of constants. * * @return list of constants */ - public List<Constant> get_constants () { + public unowned List<Constant> get_constants () { return constants; } @@ -261,11 +261,11 @@ public class Vala.Struct : TypeSymbol { } /** - * Returns a copy of the list of methods. + * Returns the list of methods. * * @return list of methods */ - public List<Method> get_methods () { + public unowned List<Method> get_methods () { return methods; } @@ -288,11 +288,11 @@ public class Vala.Struct : TypeSymbol { } /** - * Returns a copy of the list of properties. + * Returns the list of properties. * * @return list of properties */ - public List<Property> get_properties () { + public unowned List<Property> get_properties () { return properties; } diff --git a/vala/valastructvaluetype.vala b/vala/valastructvaluetype.vala index 556162789..7bdd44f87 100644 --- a/vala/valastructvaluetype.vala +++ b/vala/valastructvaluetype.vala @@ -48,7 +48,7 @@ public class Vala.StructValueType : ValueType { } } - public override List<Parameter>? get_parameters () { + public override unowned List<Parameter>? get_parameters () { var st = type_symbol as Struct; if (st != null && st.default_construction_method != null) { return st.default_construction_method.get_parameters (); diff --git a/vala/valaswitchsection.vala b/vala/valaswitchsection.vala index 2b6bc60ab..aa57825a0 100644 --- a/vala/valaswitchsection.vala +++ b/vala/valaswitchsection.vala @@ -53,11 +53,11 @@ public class Vala.SwitchSection : Block { } /** - * Returns a copy of the list of switch labels. + * Returns the list of switch labels. * * @return switch label list */ - public List<SwitchLabel> get_labels () { + public unowned List<SwitchLabel> get_labels () { return labels; } diff --git a/vala/valaswitchstatement.vala b/vala/valaswitchstatement.vala index 78cfa3d82..3a16872d7 100644 --- a/vala/valaswitchstatement.vala +++ b/vala/valaswitchstatement.vala @@ -65,11 +65,11 @@ public class Vala.SwitchStatement : CodeNode, Statement { } /** - * Returns a copy of the list of switch sections. + * Returns the list of switch sections. * * @return section list */ - public List<SwitchSection> get_sections () { + public unowned List<SwitchSection> get_sections () { return sections; } diff --git a/vala/valatemplate.vala b/vala/valatemplate.vala index 5def6781b..26be05df9 100644 --- a/vala/valatemplate.vala +++ b/vala/valatemplate.vala @@ -43,7 +43,7 @@ public class Vala.Template : Expression { expr.parent_node = this; } - public List<Expression> get_expressions () { + public unowned List<Expression> get_expressions () { return expression_list; } diff --git a/vala/valatrystatement.vala b/vala/valatrystatement.vala index fcacfc7fb..43debfbaa 100644 --- a/vala/valatrystatement.vala +++ b/vala/valatrystatement.vala @@ -80,11 +80,11 @@ public class Vala.TryStatement : CodeNode, Statement { } /** - * Returns a copy of the list of catch clauses. + * Returns the list of catch clauses. * * @return list of catch clauses */ - public List<CatchClause> get_catch_clauses () { + public unowned List<CatchClause> get_catch_clauses () { return catch_clauses; } diff --git a/vala/valatuple.vala b/vala/valatuple.vala index 87a0a9c4e..9064a1db8 100644 --- a/vala/valatuple.vala +++ b/vala/valatuple.vala @@ -49,7 +49,7 @@ public class Vala.Tuple : Expression { expr.parent_node = this; } - public List<Expression> get_expressions () { + public unowned List<Expression> get_expressions () { return expression_list; } |