From f96480fd4e97cbdafd22469cb220a99017ad8249 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Thu, 21 Aug 2008 14:21:00 +0000 Subject: [PATCH] Use g_module_build_path to resolve the shlib name 2008-08-21 Johan Dahlin * girepository/gtypelib.c (_g_typelib_init): Use g_module_build_path to resolve the shlib name svn path=/trunk/; revision=437 --- ChangeLog | 5 +++++ girepository/gtypelib.c | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b79008..f60df04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-08-21 Johan Dahlin + + * girepository/gtypelib.c (_g_typelib_init): + Use g_module_build_path to resolve the shlib name + 2008-08-21 Colin Walters * gir/Makefile.am: CLEANFILES typelibs too. diff --git a/girepository/gtypelib.c b/girepository/gtypelib.c index c737120..6e04f65 100644 --- a/girepository/gtypelib.c +++ b/girepository/gtypelib.c @@ -1836,6 +1836,8 @@ _g_typelib_init (GTypelib *typelib) if (typelib->module == NULL) { + gchar *resolved_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 @@ -1844,11 +1846,14 @@ _g_typelib_init (GTypelib *typelib) * themselves and are not expecting to be unloaded. So we just * load modules globally for now. */ - - typelib->module = g_module_open (shlib, G_MODULE_BIND_LAZY); + + resolved_shlib = g_module_build_path (NULL, shlib); + typelib->module = g_module_open (resolved_shlib, G_MODULE_BIND_LAZY); if (typelib->module == NULL) g_warning ("Failed to load shared library referenced by the typelib: %s", g_module_error ()); + + g_free (resolved_shlib); } } } -- 2.7.4