]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Return unowned references of internal helper symbols
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 30 Sep 2019 10:59:51 +0000 (12:59 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 30 Sep 2019 12:41:42 +0000 (14:41 +0200)
vala/valaarraytype.vala
vala/valaenumvaluetype.vala
vala/valasignaltype.vala

index 84522ca4ce47e3ca1cea50711479899d446c306d..e9104db5404491b9352c51d6e9e4b594bc9fccd7 100644 (file)
@@ -105,7 +105,7 @@ public class Vala.ArrayType : ReferenceType {
                return null;
        }
 
-       private ArrayLengthField get_length_field () {
+       unowned ArrayLengthField get_length_field () {
                if (length_field == null) {
                        length_field = new ArrayLengthField (source_reference);
 
@@ -122,7 +122,7 @@ public class Vala.ArrayType : ReferenceType {
                return length_field;
        }
 
-       private ArrayResizeMethod get_resize_method () {
+       unowned ArrayResizeMethod get_resize_method () {
                if (resize_method == null) {
                        resize_method = new ArrayResizeMethod (source_reference);
 
@@ -138,7 +138,7 @@ public class Vala.ArrayType : ReferenceType {
                return resize_method;
        }
 
-       private ArrayMoveMethod get_move_method () {
+       unowned ArrayMoveMethod get_move_method () {
                if (move_method == null) {
                        move_method = new ArrayMoveMethod (source_reference);
 
@@ -154,7 +154,7 @@ public class Vala.ArrayType : ReferenceType {
                return move_method;
        }
 
-       private ArrayCopyMethod get_copy_method () {
+       unowned ArrayCopyMethod get_copy_method () {
                if (copy_method == null) {
                        copy_method = new ArrayCopyMethod (source_reference);
 
index be8ac15d0ac8ee3012f5db9c66f9cfc192af7a84..6c6aca3986a795026c778905475ffc3e58ccc597 100644 (file)
@@ -41,7 +41,7 @@ public class Vala.EnumValueType : ValueType {
                return result;
        }
 
-       public Method get_to_string_method () {
+       public unowned Method get_to_string_method () {
                if (to_string_method == null) {
                        var string_type = new ObjectType ((Class) CodeContext.get ().root.scope.lookup ("string"));
                        string_type.value_owned = false;
index f6a176b18382c3e25d6003b7687cb1b620a557c6..5ee83dfdcf05533baeba0a313cb73bed06c46e8c 100644 (file)
@@ -77,7 +77,7 @@ public class Vala.SignalType : CallableType {
                return result;
        }
 
-       Method get_connect_method () {
+       unowned Method get_connect_method () {
                if (connect_method == null) {
                        var ulong_type = new IntegerType ((Struct) CodeContext.get ().root.scope.lookup ("ulong"));
                        connect_method = new Method ("connect", ulong_type);
@@ -89,7 +89,7 @@ public class Vala.SignalType : CallableType {
                return connect_method;
        }
 
-       Method get_connect_after_method () {
+       unowned Method get_connect_after_method () {
                if (connect_after_method == null) {
                        var ulong_type = new IntegerType ((Struct) CodeContext.get ().root.scope.lookup ("ulong"));
                        connect_after_method = new Method ("connect_after", ulong_type);
@@ -101,7 +101,7 @@ public class Vala.SignalType : CallableType {
                return connect_after_method;
        }
 
-       Method get_disconnect_method () {
+       unowned Method get_disconnect_method () {
                if (disconnect_method == null) {
                        disconnect_method = new Method ("disconnect", new VoidType ());
                        disconnect_method.access = SymbolAccessibility.PUBLIC;