]> 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 14:05:40 +0000 (16:05 +0200)
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 33731c8c6cc90beb7e1892e5bbfa26e745d6ef20..f2c2fc61f62568778a4ae89704dbc56c6bb6081f 100644 (file)
@@ -349,7 +349,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 7e92206f56b7dca440038004e6a96e7ee74b0c15..5ccdf74b190463924fc6bcccf938abb97792c13a 100644 (file)
@@ -50,7 +50,7 @@ public abstract class Valadoc.Api.Node : Item, Browsable, 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 3b375a330bba158aff2b7d471ebadb87f5e7c814..22bcefb67a32ac56471b47228e71aacdf28179ed 100644 (file)
@@ -34,7 +34,7 @@ public abstract class Valadoc.Api.Symbol : Node {
                get;
        }
 
-       public Symbol (Node parent, SourceFile file, string? name, SymbolAccessibility accessibility,
+       protected Symbol (Node parent, SourceFile file, string? name, SymbolAccessibility accessibility,
                                   Vala.Symbol data)
        {
                base (parent, file, name, data);
index 17c3501c8554c9ea23e5fd720f13854a881b2f97..aa952f0e8ff36382563ab2388175759377c59a34 100644 (file)
@@ -32,7 +32,7 @@ public abstract class Valadoc.Api.TypeSymbol : Symbol {
        private string? type_cast_macro_name;
        private string? type_function_name;
 
-       public TypeSymbol (Node parent, SourceFile file, string name, SymbolAccessibility accessibility,
+       protected TypeSymbol (Node parent, SourceFile file, string name, SymbolAccessibility accessibility,
                                           SourceComment? comment, string? type_macro_name, string? is_type_macro_name,
                                           string? type_cast_macro_name, string? type_function_name, 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 eab81c425f6e0b211b6c5275fe61dbfee9817106..b1726146932af81ccaf6c03fbeda503570a3afbb 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 59e75a577995533f19de7c99190f6b39de9881cb..c41f6a0e26fde136e6dab9d113a9ac3a7793f51c 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;
        }