aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-module-loader.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ephy-module-loader.c')
-rw-r--r--lib/ephy-module-loader.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/ephy-module-loader.c b/lib/ephy-module-loader.c
index 99c452927..2cd72fd89 100644
--- a/lib/ephy-module-loader.c
+++ b/lib/ephy-module-loader.c
@@ -96,13 +96,6 @@ ephy_module_loader_new (const char *path)
g_type_module_set_name (G_TYPE_MODULE (result), path);
result->path = g_strdup (path);
- if (!g_type_module_use (G_TYPE_MODULE (result)))
- {
- g_object_unref (result);
-
- return NULL;
- }
-
return result;
}
@@ -110,14 +103,11 @@ static gboolean
ephy_module_loader_load (GTypeModule *module)
{
EphyModuleLoader *loader = EPHY_MODULE_LOADER (module);
- char *module_path;
register_module_fn register_module;
LOG ("ephy_module_loader_load %s", loader->path)
- module_path = g_strdup (loader->path);
- loader->library = g_module_open (module_path, 0);
- g_free (module_path);
+ loader->library = g_module_open (loader->path, 0);
if (!loader->library)
{
@@ -159,6 +149,14 @@ ephy_module_loader_unload (GTypeModule *module)
loader->type = 0;
}
+const char *
+ephy_module_loader_get_path (EphyModuleLoader *loader)
+{
+ g_return_val_if_fail (EPHY_IS_MODULE_LOADER (loader), NULL);
+
+ return loader->path;
+}
+
static void
ephy_module_loader_class_init (EphyModuleLoaderClass *class)
{