diff options
author | Havoc Pennington <hp@pobox.com> | 2008-04-23 01:04:43 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2008-04-23 01:04:43 +0000 |
commit | 82a80f437f90dfc7d8f99b21103a16c95ad5b93f (patch) | |
tree | 32e6f77bc05b2c7e6ab7e8e268ea857a101f94a4 /girepository | |
parent | 8f3a4b04f6c17ab6f69ea7ad4cbf87c70840ce20 (diff) | |
download | gobject-introspection-82a80f437f90dfc7d8f99b21103a16c95ad5b93f.tar.gz |
remove G_MODULE_BIND_LOCAL flag when loading libraries, since some libs
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.
svn path=/trunk/; revision=217
Diffstat (limited to 'girepository')
-rw-r--r-- | girepository/gmetadata.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/girepository/gmetadata.c b/girepository/gmetadata.c index b6803904..ac5619ac 100644 --- a/girepository/gmetadata.c +++ b/girepository/gmetadata.c @@ -1759,8 +1759,18 @@ _g_metadata_init (GMetadata *metadata) 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 ()); |