From ae45d93cc019c541cf72f207d696218ed909a458 Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Thu, 14 Dec 2017 19:05:55 +0100 Subject: [PATCH] vala: Replace more public fields --- vala/valaattribute.vala | 3 ++- vala/valacodecontext.vala | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/vala/valaattribute.vala b/vala/valaattribute.vala index f1ef73f81..ed80d66d7 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 args = new HashMap (str_hash, str_equal); + public Vala.Map 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 (str_hash, str_equal); if (!CodeContext.get ().deprecated) { if (name == "Deprecated") { diff --git a/vala/valacodecontext.vala b/vala/valacodecontext.vala index ba369a167..404d9d8ae 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 source_files = new ArrayList (); private List c_source_files = new ArrayList (); -- 2.47.2