[vala/switch-to-gir] vapigen: Do not unmark all non-vapi source files as external_package.
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/switch-to-gir] vapigen: Do not unmark all non-vapi source files as external_package.
- Date: Wed, 25 Aug 2010 21:00:37 +0000 (UTC)
commit 60b284ac40df6752f2d53244d9bfe9fd5ada3fae
Author: Luca Bruno <lethalman88 gmail com>
Date: Wed Aug 25 21:54:56 2010 +0200
vapigen: Do not unmark all non-vapi source files as external_package.
Now that it is possible to feed new source files during the parsing process
it is no more good practice to unmark all the source files.
vapigen/valavapigen.vala | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/vapigen/valavapigen.vala b/vapigen/valavapigen.vala
index 0d1f06c..f0a4697 100644
--- a/vapigen/valavapigen.vala
+++ b/vapigen/valavapigen.vala
@@ -119,9 +119,13 @@ class Vala.VAPIGen : Object {
return quit ();
}
+ /* source files to be later unmarked as external_package */
+ var source_files = new ArrayList<SourceFile> ();
foreach (string source in sources) {
if (FileUtils.test (source, FileTest.EXISTS)) {
- context.add_source_file (new SourceFile (context, source, true));
+ var source_file = new SourceFile (context, source, true);
+ source_files.add (source_file);
+ context.add_source_file (source_file);
} else {
Report.error (null, "%s not found".printf (source));
}
@@ -168,7 +172,7 @@ class Vala.VAPIGen : Object {
}
// interface writer ignores external packages
- foreach (SourceFile file in context.get_source_files ()) {
+ foreach (SourceFile file in source_files) {
if (!file.filename.has_suffix (".vapi")) {
file.external_package = false;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]