[vala/switch-to-gir: 1/36] vapigen: Remove obsolete code for handling omitted --library option



commit 8705014288520d4718482d5108765588231ebecf
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]