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 /vala/valamethod.vala | |
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.
Diffstat (limited to 'vala/valamethod.vala')
-rw-r--r-- | vala/valamethod.vala | 14 |
1 files changed, 7 insertions, 7 deletions
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; } |