Don't open shared library here; we already do it in gtypelib.c.
authorColin Walters <walters@verbum.org>
Sun, 24 Aug 2008 16:55:07 +0000 (16:55 +0000)
committerColin Walters <walters@src.gnome.org>
Sun, 24 Aug 2008 16:55:07 +0000 (16:55 +0000)
2008-08-24  Colin Walters  <walters@verbum.org>

* girepository/girepository.c (g_irepository_require):
Don't open shared library here; we already do it
in gtypelib.c.

svn path=/trunk/; revision=483

ChangeLog
girepository/girepository.c

index 4a12ae9..296432c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2008-08-24  Colin Walters  <walters@verbum.org>
 
+       * girepository/girepository.c (g_irepository_require): 
+       Don't open shared library here; we already do it
+       in gtypelib.c.
+
+2008-08-24  Colin Walters  <walters@verbum.org>
+
        * girepository/gtypelib.c: Add context stack so
        when we get an error we can print out nicely
        where it is.
index cf18a2e..e77406d 100644 (file)
@@ -560,32 +560,6 @@ g_irepository_require (GIRepository  *repository,
     }
 
   g_free (fname);
-  
-  /* optionally load shared library and attach it to the typelib */
-  shlib = ((Header *) typelib->data)->shared_library;
-  if (shlib)
-    {
-      gchar *resolved_shlib;
-
-      shlib_fname = g_typelib_get_string (typelib, shlib);
-      resolved_shlib = g_module_build_path (NULL, shlib_fname);
-
-      module = g_module_open (resolved_shlib,
-                             G_MODULE_BIND_LAZY|G_MODULE_BIND_LOCAL);
-      if (module == NULL)
-       {
-         g_set_error (error, G_IREPOSITORY_ERROR,
-                      G_IREPOSITORY_ERROR_TYPELIB_NOT_FOUND,
-                      "Typelib for namespace '%s' references shared library "
-                      "%s, but it could not be openened (%s)",
-                      namespace, resolved_shlib, g_module_error ());
-         g_free (full_path);
-         g_free (resolved_shlib);
-         return NULL;
-       }
-      g_free (resolved_shlib);
-    }
-
   g_hash_table_remove (table, namespace);
   register_internal (repository, full_path, typelib);
   g_free (full_path);