From b083af081c7ecc4bb3f4e9544b30f4abce2560cf Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Sat, 3 Nov 2018 14:38:21 +0100 Subject: [PATCH] vala: Drop "explicit" from ValaSourceFile and use "from_commandline" --- vala/valagirparser.vala | 2 +- vala/valasourcefile.vala | 5 ----- vapigen/valavapigen.vala | 4 ++-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala index 23958dbe9..b918395a9 100644 --- a/vala/valagirparser.vala +++ b/vala/valagirparser.vala @@ -1917,7 +1917,7 @@ public class Vala.GirParser : CodeVisitor { if (context.has_package (pkg)) { // package already provided elsewhere, stop parsing this GIR // if it was not passed explicitly - if (!this.current_source_file.explicit) { + if (!this.current_source_file.from_commandline) { return; } } else { diff --git a/vala/valasourcefile.vala b/vala/valasourcefile.vala index b056c0126..35eaf5f26 100644 --- a/vala/valasourcefile.vala +++ b/vala/valasourcefile.vala @@ -124,11 +124,6 @@ public class Vala.SourceFile { */ public bool used { get; set; } - /** - * Whether this source-file was explicitly passed on the commandline. - */ - public bool explicit { get; set; } - private ArrayList comments = new ArrayList (); public List current_using_directives { get; set; default = new ArrayList (); } diff --git a/vapigen/valavapigen.vala b/vapigen/valavapigen.vala index f4ae9a50e..63205499d 100644 --- a/vapigen/valavapigen.vala +++ b/vapigen/valavapigen.vala @@ -132,7 +132,7 @@ class Vala.VAPIGen { foreach (string source in sources) { if (FileUtils.test (source, FileTest.EXISTS)) { var source_file = new SourceFile (context, SourceFileType.PACKAGE, source); - source_file.explicit = true; + source_file.from_commandline = true; context.add_source_file (source_file); } else { Report.error (null, "%s not found".printf (source)); @@ -190,7 +190,7 @@ class Vala.VAPIGen { } } } - if (file.explicit && file.package_name != null) { + if (file.from_commandline && file.package_name != null) { package_names += file.package_name; } } -- 2.47.2