[vala/staging] vala: Replace/Drop public fields
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] vala: Replace/Drop public fields
- Date: Thu, 14 Dec 2017 19:44:39 +0000 (UTC)
commit c02a5ee42bc60f119d671c0d622be424116bdcc9
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Thu Dec 14 19:05:55 2017 +0100
vala: Replace/Drop public fields
vala/valaattribute.vala | 3 ++-
vala/valacodecontext.vala | 10 +++++-----
vala/valareport.vala | 4 ++--
3 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/vala/valaattribute.vala b/vala/valaattribute.vala
index f1ef73f..ed80d66 100644
--- a/vala/valaattribute.vala
+++ b/vala/valaattribute.vala
@@ -34,7 +34,7 @@ public class Vala.Attribute : CodeNode {
/**
* Contains all specified attribute arguments.
*/
- public Vala.Map<string,string> args = new HashMap<string,string> (str_hash, str_equal);
+ public Vala.Map<string,string> args { get; private set; }
/**
* Creates a new attribute.
@@ -46,6 +46,7 @@ public class Vala.Attribute : CodeNode {
public Attribute (string name, SourceReference? source_reference = null) {
this.name = name;
this.source_reference = source_reference;
+ this.args = new HashMap<string,string> (str_hash, str_equal);
if (!CodeContext.get ().deprecated) {
if (name == "Deprecated") {
diff --git a/vala/valacodecontext.vala b/vala/valacodecontext.vala
index ba369a1..404d9d8 100644
--- a/vala/valacodecontext.vala
+++ b/vala/valacodecontext.vala
@@ -116,17 +116,17 @@ public class Vala.CodeContext {
/**
* List of directories where to find .vapi files.
*/
- public string[] vapi_directories = {};
+ public string[] vapi_directories { get; set; default = {}; }
/**
* List of directories where to find .gir files.
*/
- public string[] gir_directories = {};
+ public string[] gir_directories { get; set; default = {}; }
/**
* List of directories where to find .metadata files for .gir files.
*/
- public string[] metadata_directories = {};
+ public string[] metadata_directories { get; set; default = {}; }
/**
* Produce debug information.
@@ -198,9 +198,9 @@ public class Vala.CodeContext {
public bool run_output { get; set; }
- public string[] gresources = {};
+ public string[] gresources { get; set; default = {}; }
- public string[] gresources_directories = {};
+ public string[] gresources_directories { get; set; default = {}; }
private List<SourceFile> source_files = new ArrayList<SourceFile> ();
private List<string> c_source_files = new ArrayList<string> ();
diff --git a/vala/valareport.vala b/vala/valareport.vala
index 3015ea3..50f904b 100644
--- a/vala/valareport.vala
+++ b/vala/valareport.vala
@@ -99,8 +99,8 @@ public class Vala.Report {
private unowned string quote_color_end = "";
- protected int warnings;
- protected int errors;
+ private int warnings;
+ private int errors;
private bool verbose_errors;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]