gobject-introspection r217 - in trunk: . girepository



Author: hp
Date: Wed Apr 23 01:04:43 2008
New Revision: 217
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=217&view=rev

Log:
2008-04-22  Havoc Pennington  <hp pobox com>

	* girepository/gmetadata.c (_g_metadata_init): remove
	G_MODULE_BIND_LOCAL flag when loading libraries, since some libs
	(Glade and Clutter for example) rely on being loaded globally.



Modified:
   trunk/ChangeLog
   trunk/girepository/gmetadata.c

Modified: trunk/girepository/gmetadata.c
==============================================================================
--- trunk/girepository/gmetadata.c	(original)
+++ trunk/girepository/gmetadata.c	Wed Apr 23 01:04:43 2008
@@ -1759,8 +1759,18 @@
   if (header->shared_library)
     {
       const gchar *shlib;
+
+      /* Glade's autoconnect feature and OpenGL's extension mechanism
+       * as used by Clutter rely on dlopen(NULL) to work as a means of
+       * accessing the app's symbols. This keeps us from using
+       * G_MODULE_BIND_LOCAL. BIND_LOCAL may have other issues as well;
+       * in general libraries are not expecting multiple copies of
+       * themselves and are not expecting to be unloaded. So we just
+       * load modules globally for now.
+       */
+      
       shlib = g_metadata_get_string (metadata, header->shared_library);
-      metadata->module = g_module_open (shlib, G_MODULE_BIND_LAZY|G_MODULE_BIND_LOCAL);
+      metadata->module = g_module_open (shlib, G_MODULE_BIND_LAZY);
       if (metadata->module == NULL)
         g_warning ("Failed to load shared library referenced by the metadata: %s",
                    g_module_error ());



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