summaryrefslogtreecommitdiff
path: root/vapigen
diff options
context:
space:
mode:
authorLuca Bruno <lethalman88@gmail.com>2010-10-16 22:07:37 -0700
committerEvan Nemerson <evan@coeus-group.com>2010-11-08 01:43:18 -0800
commite58d350311e61dc1690eac52a1a7fa2c6a69ffae (patch)
tree0de9c1849dae2f7291626348872c5e3349181f4d /vapigen
parentc36400f351072a92d0d664ae11327eefaaa2419b (diff)
downloadvala-e58d350311e61dc1690eac52a1a7fa2c6a69ffae.tar.gz
vapigen: Remove obsolete code for handling omitted --library option
Diffstat (limited to 'vapigen')
-rw-r--r--vapigen/valavapigen.vala27
1 files changed, 7 insertions, 20 deletions
diff --git a/vapigen/valavapigen.vala b/vapigen/valavapigen.vala
index a5cc9234f..a660c3633 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 ();
}