]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Mark defined constructors of abstract classes as protected
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 12 Mar 2019 09:06:11 +0000 (10:06 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 10 Apr 2019 12:41:36 +0000 (14:41 +0200)
codegen/valaccodebasemodule.vala
tests/asynchronous/generator.vala
tests/chainup/bug791785.vala
vala/valaobjecttypesymbol.vala
vala/valasymbol.vala
vala/valatypesymbol.vala
vala/valavaluetype.vala

index 617849f59a1b3709559d23c7b8ab68fb2b8fbcd4..1d0b416ae264680f8346c4381c1a20d1b0f6b528 100644 (file)
@@ -352,7 +352,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 
        public static int ccode_attribute_cache_index = CodeNode.get_attribute_cache_index ();
 
-       public CCodeBaseModule () {
+       protected CCodeBaseModule () {
                predefined_marshal_set = new HashSet<string> (str_hash, str_equal);
                predefined_marshal_set.add ("VOID:VOID");
                predefined_marshal_set.add ("VOID:BOOLEAN");
index f31e12a42078453ce8c472ec6e091a2100dcf9b3..2c3654b567fa8e6a9c2b6c36a8bb52120df30f37 100644 (file)
@@ -7,7 +7,7 @@ abstract class Generator<G> {
        unowned G value;
        SourceFunc callback;
 
-       public Generator () {
+       protected Generator () {
                helper.begin ();
        }
 
index eb46b0141def8e4d565e51f0fd51aea2a446d02c..608de6b0ee97bf54090735d04925551b404d47d0 100644 (file)
@@ -5,7 +5,7 @@ struct Foo {
 abstract class AbstractBar {
        public Foo foo;
 
-       public AbstractBar (Foo foo) {
+       protected AbstractBar (Foo foo) {
                this.foo = foo;
        }
 }
index 14fc230dacf30899ae6f101a9d2442b92fb3024f..f254065c8b4f60e0006eea716c202b35dfef6974 100644 (file)
@@ -31,7 +31,7 @@
 public abstract class Vala.ObjectTypeSymbol : TypeSymbol {
        private List<TypeParameter> type_parameters = new ArrayList<TypeParameter> ();
 
-       public ObjectTypeSymbol (string name, SourceReference? source_reference = null, Comment? comment = null) {
+       protected ObjectTypeSymbol (string name, SourceReference? source_reference = null, Comment? comment = null) {
                base (name, source_reference, comment);
        }
 
index c9f7d1e93afe46f7350e7fa217667ce9b884dae6..02755db76083d4ed4d4a69a2d5b499e2c2913021 100644 (file)
@@ -192,7 +192,7 @@ public abstract class Vala.Symbol : CodeNode {
        private weak Scope _owner;
        private Scope _scope;
 
-       public Symbol (string? name, SourceReference? source_reference, Comment? comment = null) {
+       protected Symbol (string? name, SourceReference? source_reference, Comment? comment = null) {
                this.name = name;
                this.source_reference = source_reference;
                this.comment = comment;
index 8ba3aef578a02dfc9fe6cfd2e4c1a05b8028230a..f84b53f5fd72030eea6ab43a20cdc03fade26022 100644 (file)
@@ -29,7 +29,7 @@ using GLib;
  * code or imported from an external library with a Vala API file.
  */
 public abstract class Vala.TypeSymbol : Symbol {
-       public TypeSymbol (string? name, SourceReference? source_reference = null, Comment? comment = null) {
+       protected TypeSymbol (string? name, SourceReference? source_reference = null, Comment? comment = null) {
                base (name, source_reference, comment);
        }
 
index d78af996003af9c99dc4633955b8a9f729bce0aa..ed1225d6d86589325a8825893d87c8c22fa7079b 100644 (file)
@@ -31,7 +31,7 @@ public abstract class Vala.ValueType : DataType {
         */
        public weak TypeSymbol type_symbol { get; set; }
 
-       public ValueType (TypeSymbol type_symbol) {
+       protected ValueType (TypeSymbol type_symbol) {
                this.type_symbol = type_symbol;
                data_type = type_symbol;
        }