aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ephy-module-loader.c20
-rw-r--r--lib/ephy-module-loader.h2
2 files changed, 11 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)
{
diff --git a/lib/ephy-module-loader.h b/lib/ephy-module-loader.h
index 6b5b29a66..fe25712a7 100644
--- a/lib/ephy-module-loader.h
+++ b/lib/ephy-module-loader.h
@@ -38,6 +38,8 @@ GType ephy_module_loader_get_type (void);
EphyModuleLoader *ephy_module_loader_new (const char *path);
+const char *ephy_module_loader_get_path (EphyModuleLoader *loader);
+
GObject *ephy_module_loader_factory (EphyModuleLoader *loader);
G_END_DECLS