[libpeas] Remove peas_plugin_loader_add_module_directory()
- From: Steve Frécinaux <sfre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Remove peas_plugin_loader_add_module_directory()
- Date: Sun, 6 Mar 2011 15:02:20 +0000 (UTC)
commit 8f40fb4b7db10065eeb0464f0a70dbfa1a284e8f
Author: Steve Frécinaux <code istique net>
Date: Sun Mar 6 15:37:40 2011 +0100
Remove peas_plugin_loader_add_module_directory()
This private API has not been used since we switched from static
bindings to gobject-introspection ones, ages ago.
libpeas/peas-plugin-loader.c | 14 --------------
libpeas/peas-plugin-loader.h | 6 ------
loaders/c/peas-plugin-loader-c.c | 8 --------
loaders/python/peas-plugin-loader-python.c | 21 ---------------------
loaders/seed/peas-plugin-loader-seed.c | 23 -----------------------
5 files changed, 0 insertions(+), 72 deletions(-)
---
diff --git a/libpeas/peas-plugin-loader.c b/libpeas/peas-plugin-loader.c
index ea5bfb4..442212b 100644
--- a/libpeas/peas-plugin-loader.c
+++ b/libpeas/peas-plugin-loader.c
@@ -37,20 +37,6 @@ peas_plugin_loader_class_init (PeasPluginLoaderClass *klass)
{
}
-void
-peas_plugin_loader_add_module_directory (PeasPluginLoader *loader,
- const gchar *module_dir)
-{
- PeasPluginLoaderClass *klass;
-
- g_return_if_fail (PEAS_IS_PLUGIN_LOADER (loader));
-
- klass = PEAS_PLUGIN_LOADER_GET_CLASS (loader);
- g_return_if_fail (klass->add_module_directory != NULL);
-
- klass->add_module_directory (loader, module_dir);
-}
-
gboolean
peas_plugin_loader_load (PeasPluginLoader *loader,
PeasPluginInfo *info)
diff --git a/libpeas/peas-plugin-loader.h b/libpeas/peas-plugin-loader.h
index 01f2668..a06798f 100644
--- a/libpeas/peas-plugin-loader.h
+++ b/libpeas/peas-plugin-loader.h
@@ -46,9 +46,6 @@ struct _PeasPluginLoader {
struct _PeasPluginLoaderClass {
GObjectClass parent;
- void (*add_module_directory) (PeasPluginLoader *loader,
- const gchar *module_dir);
-
gboolean (*load) (PeasPluginLoader *loader,
PeasPluginInfo *info);
void (*unload) (PeasPluginLoader *loader,
@@ -67,9 +64,6 @@ struct _PeasPluginLoaderClass {
GType peas_plugin_loader_get_type (void) G_GNUC_CONST;
-void peas_plugin_loader_add_module_directory (PeasPluginLoader *loader,
- const gchar *module_dir);
-
gboolean peas_plugin_loader_load (PeasPluginLoader *loader,
PeasPluginInfo *info);
void peas_plugin_loader_unload (PeasPluginLoader *loader,
diff --git a/loaders/c/peas-plugin-loader-c.c b/loaders/c/peas-plugin-loader-c.c
index cc65393..e7f664f 100644
--- a/loaders/c/peas-plugin-loader-c.c
+++ b/loaders/c/peas-plugin-loader-c.c
@@ -45,13 +45,6 @@ peas_register_types (PeasObjectModule *module)
PEAS_TYPE_PLUGIN_LOADER_C);
}
-static void
-peas_plugin_loader_c_add_module_directory (PeasPluginLoader *loader,
- const gchar *module_dir)
-{
- /* This is a no-op for C modules... */
-}
-
static gboolean
peas_plugin_loader_c_load (PeasPluginLoader *loader,
PeasPluginInfo *info)
@@ -203,7 +196,6 @@ peas_plugin_loader_c_class_init (PeasPluginLoaderCClass *klass)
object_class->finalize = peas_plugin_loader_c_finalize;
- loader_class->add_module_directory = peas_plugin_loader_c_add_module_directory;
loader_class->load = peas_plugin_loader_c_load;
loader_class->unload = peas_plugin_loader_c_unload;
loader_class->provides_extension = peas_plugin_loader_c_provides_extension;
diff --git a/loaders/python/peas-plugin-loader-python.c b/loaders/python/peas-plugin-loader-python.c
index 9246601..91fe43c 100644
--- a/loaders/python/peas-plugin-loader-python.c
+++ b/loaders/python/peas-plugin-loader-python.c
@@ -234,26 +234,6 @@ add_python_info (PeasPluginLoaderPython *loader,
g_hash_table_insert (loader->priv->loaded_plugins, info, pyinfo);
}
-static void
-peas_plugin_loader_python_add_module_directory (PeasPluginLoader *loader,
- const gchar *module_dir)
-{
- PeasPluginLoaderPython *pyloader = PEAS_PLUGIN_LOADER_PYTHON (loader);
- PyGILState_STATE state;
-
- /* Bail if we failed to initialise Python, since adding a module path won't
- * help us, and calling the GIL functions will cause a crash. */
- if (pyloader->priv->init_failed)
- return;
-
- state = pyg_gil_state_ensure ();
-
- g_debug ("Adding '%s' as a module path for the Python loader", module_dir);
- peas_plugin_loader_python_add_module_path (pyloader, module_dir);
-
- pyg_gil_state_release (state);
-}
-
static gboolean
peas_plugin_loader_python_load (PeasPluginLoader *loader,
PeasPluginInfo *info)
@@ -567,7 +547,6 @@ peas_plugin_loader_python_class_init (PeasPluginLoaderPythonClass *klass)
object_class->finalize = peas_plugin_loader_python_finalize;
- loader_class->add_module_directory = peas_plugin_loader_python_add_module_directory;
loader_class->load = peas_plugin_loader_python_load;
loader_class->unload = peas_plugin_loader_python_unload;
loader_class->create_extension = peas_plugin_loader_python_create_extension;
diff --git a/loaders/seed/peas-plugin-loader-seed.c b/loaders/seed/peas-plugin-loader-seed.c
index 36261db..62d6af6 100644
--- a/loaders/seed/peas-plugin-loader-seed.c
+++ b/loaders/seed/peas-plugin-loader-seed.c
@@ -41,28 +41,6 @@ typedef struct {
static SeedEngine *seed = NULL;
-static void
-peas_plugin_loader_seed_add_module_directory (PeasPluginLoader *loader,
- const gchar *module_dir)
-{
- gchar **sp = seed_engine_get_search_path (seed);
-
- if (sp)
- {
- gchar *orig_sp = g_strjoinv (":", sp);
- gchar *new_sp = g_strconcat (module_dir, ":", orig_sp, NULL);
-
- seed_engine_set_search_path (seed, new_sp);
-
- g_free (new_sp);
- g_free (orig_sp);
- }
- else
- {
- seed_engine_set_search_path (seed, module_dir);
- }
-}
-
static gchar *
get_script_for_plugin_info (PeasPluginInfo *info,
SeedContext context)
@@ -283,7 +261,6 @@ peas_plugin_loader_seed_class_init (PeasPluginLoaderSeedClass *klass)
object_class->finalize = peas_plugin_loader_seed_finalize;
- loader_class->add_module_directory = peas_plugin_loader_seed_add_module_directory;
loader_class->load = peas_plugin_loader_seed_load;
loader_class->provides_extension = peas_plugin_loader_seed_provides_extension;
loader_class->create_extension = peas_plugin_loader_seed_create_extension;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]