From 7d317ebfd78bb0e569f277e31b0f4522469b48af Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Wed, 2 Jan 2019 14:23:40 +0100 Subject: vala: Let methods return an unowned reference to internal collections Correctly state ownership in documentation since those were never a copy. --- vala/valamethod.vala | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'vala/valamethod.vala') 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 get_parameters () { + public unowned List 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 get_type_parameters () { + public unowned List 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 get_preconditions () { + public unowned List 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 get_postconditions () { + public unowned List get_postconditions () { if (postconditions != null) { return postconditions; } -- cgit v1.2.1