java-gobject-introspection r80 - trunk/src/org/gnome/gir/compiler



Author: walters
Date: Wed Oct 15 03:34:46 2008
New Revision: 80
URL: http://svn.gnome.org/viewvc/java-gobject-introspection?rev=80&view=rev

Log:
Handle comma separated list of shared libraries for Clutter


Modified:
   trunk/src/org/gnome/gir/compiler/CodeFactory.java

Modified: trunk/src/org/gnome/gir/compiler/CodeFactory.java
==============================================================================
--- trunk/src/org/gnome/gir/compiler/CodeFactory.java	(original)
+++ trunk/src/org/gnome/gir/compiler/CodeFactory.java	Wed Oct 15 03:34:46 2008
@@ -2062,10 +2062,21 @@
 		mv.visitCode();
 		l0 = new Label();
 		mv.visitLabel(l0);
-		/* The JNA NativeLibrary expects it without the .so */
-		String shlib = repo.getSharedLibrary(globals.namespace);
+		/* This goop is to deal with new comma-separated list of shared libraries;
+		 * really, we should rely on the library loading inside GIRepository, and have
+		 * JNA just open the process.
+		 */
+		String shlibList = repo.getSharedLibrary(globals.namespace);
+		String shlib;
+		if (shlibList == null)
+			shlib = null;
+		else {
+			String[] shlibs = shlibList.split(",");
+			shlib = shlibs[0];
+		}
 		if (shlib == null)
 			shlib = namespaceShlibMapping.get(globals.namespace);
+		/* The JNA NativeLibrary expects it without the .so */		
 		if (shlib.endsWith(".so"))
 			shlib = shlib.substring(0, shlib.length()-3);
 		mv.visitLdcInsn(shlib);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]