]> 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>
Tue, 12 Mar 2019 11:01:30 +0000 (12:01 +0100)
13 files changed:
codegen/valaccodebasemodule.vala
libvaladoc/api/item.vala
libvaladoc/api/node.vala
libvaladoc/api/symbol.vala
libvaladoc/api/typesymbol.vala
libvaladoc/content/inlinetaglet.vala
libvaladoc/importer/documentationimporter.vala
tests/asynchronous/generator.vala
tests/chainup/bug791785.vala
vala/valaobjecttypesymbol.vala
vala/valasymbol.vala
vala/valatypesymbol.vala
vala/valavaluetype.vala

index acbb763ce459dafeb7b9b4171a613d305170409c..cc3a03f7a3fdc889ca37e376e2a678fe0a3b6454 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 69bec622ac76471733091c35e7868ba5aeeae4c6..5b344bbf88046020ccc57f141185c1dc0a4deb13 100644 (file)
@@ -42,7 +42,7 @@ public abstract class Valadoc.Api.Item : Object {
                get;
        }
 
-       public Item (Vala.CodeNode? data) {
+       protected Item (Vala.CodeNode? data) {
                this.data = data;
        }
 
index 298ff0f7bdedfa8dbc7b2aa1defd9c77e74a71fb..079c7ee442c3359f2be136e831337da4190aed57 100644 (file)
@@ -50,7 +50,7 @@ public abstract class Valadoc.Api.Node : Item, Documentation {
        private Vala.Map<NodeType, Vala.List<Node>> per_type_children;
 
 
-       public Node (Node? parent, SourceFile? file, string? name, Vala.CodeNode? data) {
+       protected Node (Node? parent, SourceFile? file, string? name, Vala.CodeNode? data) {
                base (data);
 
                per_name_children = new Vala.HashMap<string, Node> (str_hash, str_equal);
index 22466981e773773f4f9b045d819f14953871ea47..b7fdd438dd1665a62727219b6b9b2297c0c242bd 100644 (file)
@@ -35,7 +35,7 @@ public abstract class Valadoc.Api.Symbol : Node {
                get;
        }
 
-       public Symbol (Node parent, SourceFile file, string? name, Vala.SymbolAccessibility accessibility,
+       protected Symbol (Node parent, SourceFile file, string? name, Vala.SymbolAccessibility accessibility,
                                   SourceComment? comment, Vala.Symbol data)
        {
                base (parent, file, name, data);
index 4891548a4cda27b420cf8a8ac0d829a907c53090..db7d947b01f56393112e4040bd4e0508535b0a24 100644 (file)
@@ -26,7 +26,7 @@
  * Represents a runtime data type.
  */
 public abstract class Valadoc.Api.TypeSymbol : Symbol {
-       public TypeSymbol (Node parent, SourceFile file, string name, Vala.SymbolAccessibility accessibility,
+       protected TypeSymbol (Node parent, SourceFile file, string name, Vala.SymbolAccessibility accessibility,
                                           SourceComment? comment, bool is_basic_type,
                                           Vala.TypeSymbol data)
        {
index ad6c7a71950cf5db7e2e1e736ae8b28ef20b0771..b28c7597c95d5fc0464d5ad4faeef408aa3ece78 100644 (file)
@@ -27,7 +27,7 @@ public abstract class Valadoc.Content.InlineTaglet : ContentElement, Taglet, Inl
        protected ResourceLocator locator;
        private ContentElement _content;
 
-       public InlineTaglet () {
+       protected InlineTaglet () {
                base ();
        }
 
index 2701571d771da6e5157a01a7d9a2c31ae3a26896..92737dc73db878f09cbbccd07781dfa363763089 100644 (file)
@@ -28,7 +28,7 @@ public abstract class Valadoc.Importer.DocumentationImporter : Object, ResourceL
 
        public abstract string file_extension { get; }
 
-       public DocumentationImporter (Api.Tree tree, ModuleLoader modules, Settings settings) {
+       protected DocumentationImporter (Api.Tree tree, ModuleLoader modules, Settings settings) {
                this.settings = settings;
                this.modules = null;
                this.tree = tree;
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 ce17d63c160b54b429c99e79ffd09e5716e59ef7..ad0de3ffef80b2e673fb272b333ae444a3b08e90 100644 (file)
@@ -47,7 +47,7 @@ public abstract class Vala.ObjectTypeSymbol : TypeSymbol {
 
        private List<Constant> constants = new ArrayList<Constant> ();
 
-       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 3801c83c838580b7daf8da8dd4bc1ba5303ddb8b..67484821b516bff1098394e94081658ba34bb31b 100644 (file)
@@ -197,7 +197,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 ce1d4ea30e0b29ba52902c1af55a9f1e90de1840..3198ca04617dd1ee426ae47081c628ed16d620aa 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;
        }