[vala/switch-to-gir: 1/34] vapigen: Remove obsolete code for handling omitted --library option
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/switch-to-gir: 1/34] vapigen: Remove obsolete code for handling omitted --library option
- Date: Mon, 1 Nov 2010 17:27:16 +0000 (UTC)
commit b5522e3361511f8b1c314719a9267cea265a6ab9
Author: Luca Bruno <lethalman88 gmail com>
Date: Sat Oct 16 22:07:37 2010 -0700
vapigen: Remove obsolete code for handling omitted --library option
vapigen/valavapigen.vala | 27 +++++++--------------------
1 files changed, 7 insertions(+), 20 deletions(-)
---
diff --git a/vapigen/valavapigen.vala b/vapigen/valavapigen.vala
index a5cc923..a660c36 100644
--- a/vapigen/valavapigen.vala
+++ b/vapigen/valavapigen.vala
@@ -159,31 +159,18 @@ class Vala.VAPIGen : Object {
if (context.report.get_errors () > 0) {
return quit ();
}
-
- if (library == null && girparser.get_package_names () != null) {
- var names = girparser.get_package_names ();
- if (names.length != 1) {
- Report.error (null, "multiple packages encountered and no library name given");
- return quit ();
+ // interface writer ignores external packages
+ foreach (SourceFile file in context.get_source_files ()) {
+ if (!file.filename.has_suffix (".vapi")) {
+ file.file_type = SourceFileType.SOURCE;
}
-
- library = names[0];
}
- if (library != null) {
- // interface writer ignores external packages
- foreach (SourceFile file in context.get_source_files ()) {
- if (!file.filename.has_suffix (".vapi")) {
- file.file_type = SourceFileType.SOURCE;
- }
- }
-
- var interface_writer = new CodeWriter ();
- interface_writer.write_file (context, "%s.vapi".printf (library));
+ var interface_writer = new CodeWriter ();
+ interface_writer.write_file (context, "%s.vapi".printf (library));
- library = null;
- }
+ library = null;
return quit ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]