]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Let methods return an unowned reference to internal collections
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 2 Jan 2019 13:23:40 +0000 (14:23 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 30 Sep 2019 07:03:25 +0000 (09:03 +0200)
Correctly state ownership in documentation since those were never a copy.

35 files changed:
vala/valaarraycreationexpression.vala
vala/valabasicblock.vala
vala/valablock.vala
vala/valacallable.vala
vala/valaclass.vala
vala/valacodecontext.vala
vala/valadatatype.vala
vala/valadelegate.vala
vala/valadelegatetype.vala
vala/valaelementaccess.vala
vala/valaenum.vala
vala/valaerrordomain.vala
vala/valaforstatement.vala
vala/valainitializerlist.vala
vala/valainterface.vala
vala/valalambdaexpression.vala
vala/valamemberaccess.vala
vala/valamethod.vala
vala/valamethodcall.vala
vala/valamethodtype.vala
vala/valanamespace.vala
vala/valaobjectcreationexpression.vala
vala/valaobjecttype.vala
vala/valaobjecttypesymbol.vala
vala/valascope.vala
vala/valasignal.vala
vala/valasignaltype.vala
vala/valasourcefile.vala
vala/valastruct.vala
vala/valastructvaluetype.vala
vala/valaswitchsection.vala
vala/valaswitchstatement.vala
vala/valatemplate.vala
vala/valatrystatement.vala
vala/valatuple.vala

index c61e6bee09b131018af3cb9299a7bad2a6044770..841d8db424b39d57fe2d9ad04b4ee7367cae8a77 100644 (file)
@@ -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;
        }
 
index 759bb9ce04b146843304a5c94137123cef8549c3..26648aed6607667cf0e67eda38105d0f01c9b017 100644 (file)
@@ -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;
        }
 }
index 7419b5b9defeb79fe64986578ac4f3f2fa472a39..ae30c8b1546c003b34f7d173c093290ac158f5f4 100644 (file)
@@ -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;
        }
 
index 5b29aa9ff0927f220e8c35548e23a4e2a7601bae..b8bf036322c890eccf033be884725f05972604e7 100644 (file)
@@ -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 ();
 }
index 933a67c26d6ea37600d24d0cb141a1bcadbb31ed..c8baeaab76e03558f3af1eb6eb60e95fe94d6c30 100644 (file)
@@ -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;
        }
 
index 412b20eeb260ae61bd726d3695048a317a96b1d5..47c1cede4592b872e796a75bf8b74e1828327b12 100644 (file)
@@ -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;
        }
 
index 608178fde0e8ef9279dba82b7bc7f24b130ef998..2580eb6e8194a12e2a9bc485838881dcf47d285b 100644 (file)
@@ -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;
        }
 
index 4b4e7074ab4ea0a4f436f98ce42e68a6eaa75a58..813a73479c5bac7d68eef8eb9dbfad37a2c0f3c8 100644 (file)
@@ -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;
        }
 
index 0220b01680d7efbcee28549c8446eb2830fca57f..cbf720b8a12111d93cf1924379c74e7247766461 100644 (file)
@@ -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 ();
        }
 
index b847e9515ebfbaf111c8ed759e23e545440b079d..90c718ff80fbd26f8fe40d01a6794f546d66f9f0 100644 (file)
@@ -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;
        }
 
index 508ef12ef249998b238d248afec32231600b61fe..592e6e7a8d9b79a6bdc4ac090d0adbbcb32a252a 100644 (file)
@@ -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;
        }
 
index 0b462849ebf4267b3740e31b9a16e3528ee65018..311f2997545129ab22e56eaafbc376e51234acaf 100644 (file)
@@ -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;
        }
 
index aa70cee0bbea159da73e8d7bde134d9bae2ff6af..19501c614885574b0ec5bcbffc686cad08419f4c 100644 (file)
@@ -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;
        }
 
index a8cdea14d9b03fe3410d5e98cadc596aa20ecae3..cdafd09231e29cdf14bdde190a1fc63096604feb 100644 (file)
@@ -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;
        }
 
index f6c503641797475d38d9ef706550b7001d5d2b85..6b715356f8ec9463b3b28b35d4406af84fb17850 100644 (file)
@@ -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;
        }
 
index a22497e70a94623f2a21baf4052b70afdab50372..8a930ef61765b03b2d0aa64ef8f322d9d0e59a30 100644 (file)
@@ -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;
        }
 
index 132f72d05649949029b59c150904c1db496170de..fdc336f78bf370e58691b20f52889adf54e4bde3 100644 (file)
@@ -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;
        }
 
index 29e7171a2a0a55f870a9b9f010d147ddebebd4f3..71c3a478723216d7a7c184e29da99bea0a481dea 100644 (file)
@@ -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;
                }
index c1b034fa33e56e9c1f5b0db75958a91019c920c7..0a9d7465a1b0b69e6978629c341c191c2d2f55e5 100644 (file)
@@ -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;
        }
 
index a2effdec643fd0508af2bd6bf23d9ae5df9cf9b0..a10e61b129c43204d3fcc9e40fcdec2d5bc0a758 100644 (file)
@@ -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 ();
        }
 
index c53fda830c55c6b00cf0fa79e8166710a3d33ccc..a413f07f61330ddedbfffb00d552c3e9213178d6 100644 (file)
@@ -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;
        }
 
index 1f6d335fce6db4473026e70aef82d4af968620d5..19063a9d07dd44bf919f3dae8a2c5144679ff21a 100644 (file)
@@ -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;
        }
 
index 4683f2081586025f6d7e00f0eb8594fc0e5dd8c6..7e4c2b12d73076e35c8208251ee1a839fa30effd 100644 (file)
@@ -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 ();
index ad0de3ffef80b2e673fb272b333ae444a3b08e90..c15be3e34aed8b2ecf62d08e2b38901d6245833c 100644 (file)
@@ -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;
        }
 
index a2a946b09968a513166283e9739627c1fb5557a6..1a59d24eae8eb03d46061d22b9526390be26663e 100644 (file)
@@ -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;
        }
 }
index fa32cbe64c9cd86b7c51e9c3772f35702a3dfd17..e7caf0bffedeb7af62169027fa65bb3c053f8eb7 100644 (file)
@@ -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;
        }
 
index f9a67e90c92aa597ec6b27781cd52556539b2eed..9f016c1a1e6cb60de6ba30cbf446d3d481fe03ef 100644 (file)
@@ -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 ();
        }
 
index 4dca01224b472c76db6806f6529a6d4e0334c53a..2e270a06c5ee9e3ef2d05796f1f97d4120d3f24b 100644 (file)
@@ -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;
        }
 
index c96632805221ba5e52d61ab56d538b28490e6cb7..7b8232dba0a179e3766a261dfb6e5fca8869bbf3 100644 (file)
@@ -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;
        }
 
index 5561627894cfd08e4a4476fb0ccf83cda4efa7c0..7bdd44f872d8f5343d761b537033868da8080bf6 100644 (file)
@@ -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 ();
index 2b6bc60ab73ed9b87ebbc3dc3c6cade939451fad..aa57825a022eeba334989a67e14cda66530d1182 100644 (file)
@@ -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;
        }
 
index 78cfa3d82fcf19f54b8dd146660f1c1a6d994482..3a16872d774384d090d6ac6e0a2dc3763584b6d4 100644 (file)
@@ -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;
        }
 
index 5def6781ba68169a46ffb5f1b0c78121d39db18c..26be05df995ebd2a76b3f1b6ee05f6cd772b6e14 100644 (file)
@@ -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;
        }
 
index fcacfc7fba3c2df114e417160d988f2d7462d4fd..43debfbaa2371bfa5cbcea47221becd6f3e26176 100644 (file)
@@ -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;
        }
 
index 87a0a9c4e3df9bb8d36841f1c4b6e61c51745c9d..9064a1db8fe82f7b4c13a12a41e362f40fea28d2 100644 (file)
@@ -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;
        }