From bd928f0f29ba20cc8712e7fc76e4ac7deefb6cb7 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 14 Feb 2016 23:52:04 +0000 Subject: [PATCH] Removed non c plugin code --- src/main.c | 6 ++++ src/plugins/plugins.c | 81 ------------------------------------------- src/plugins/plugins.h | 3 -- 3 files changed, 6 insertions(+), 84 deletions(-) diff --git a/src/main.c b/src/main.c index 32ccc283..be5191da 100644 --- a/src/main.c +++ b/src/main.c @@ -124,6 +124,12 @@ main(int argc, char **argv) g_print("PGP support: Disabled\n"); #endif +#ifdef PROF_HAVE_C + g_print("C plugins: Enabled\n"); +#else + g_print("C plugins: Disabled\n"); +#endif + return 0; } diff --git a/src/plugins/plugins.c b/src/plugins/plugins.c index 32aecb31..92fa1686 100644 --- a/src/plugins/plugins.c +++ b/src/plugins/plugins.c @@ -43,21 +43,6 @@ #include "plugins/api.h" #include "plugins/plugins.h" -#ifdef PROF_HAVE_PYTHON -#include "plugins/python_plugins.h" -#include "plugins/python_api.h" -#endif - -#ifdef PROF_HAVE_RUBY -#include "plugins/ruby_plugins.h" -#include "plugins/ruby_api.h" -#endif - -#ifdef PROF_HAVE_LUA -#include "plugins/lua_plugins.h" -#include "plugins/lua_api.h" -#endif - #ifdef PROF_HAVE_C #include "plugins/c_plugins.h" #include "plugins/c_api.h" @@ -73,15 +58,6 @@ plugins_init(void) plugins = NULL; autocompleters_init(); -#ifdef PROF_HAVE_PYTHON - python_env_init(); -#endif -#ifdef PROF_HAVE_RUBY - ruby_env_init(); -#endif -#ifdef PROF_HAVE_LUA - lua_env_init(); -#endif #ifdef PROF_HAVE_C c_env_init(); #endif @@ -94,33 +70,6 @@ plugins_init(void) { gboolean loaded = FALSE; gchar *filename = plugins_load[i]; -#ifdef PROF_HAVE_PYTHON - if (g_str_has_suffix(filename, ".py")) { - ProfPlugin *plugin = python_plugin_create(filename); - if (plugin) { - plugins = g_slist_append(plugins, plugin); - loaded = TRUE; - } - } -#endif -#ifdef PROF_HAVE_RUBY - if (g_str_has_suffix(filename, ".rb")) { - ProfPlugin *plugin = ruby_plugin_create(filename); - if (plugin) { - plugins = g_slist_append(plugins, plugin); - loaded = TRUE; - } - } -#endif -#ifdef PROF_HAVE_LUA - if (g_str_has_suffix(filename, ".lua")) { - ProfPlugin *plugin = lua_plugin_create(filename); - if (plugin) { - plugins = g_slist_append(plugins, plugin); - loaded = TRUE; - } - } -#endif #ifdef PROF_HAVE_C if (g_str_has_suffix(filename, ".so")) { ProfPlugin *plugin = c_plugin_create(filename); @@ -158,12 +107,6 @@ plugins_get_lang_string(ProfPlugin *plugin) { switch (plugin->lang) { - case LANG_PYTHON: - return "Python"; - case LANG_RUBY: - return "Ruby"; - case LANG_LUA: - return "Lua"; case LANG_C: return "C"; default: @@ -444,21 +387,6 @@ plugins_shutdown(void) GSList *curr = plugins; while (curr) { -#ifdef PROF_HAVE_PYTHON - if (((ProfPlugin *)curr->data)->lang == LANG_PYTHON) { - python_plugin_destroy(curr->data); - } -#endif -#ifdef PROF_HAVE_RUBY - if (((ProfPlugin *)curr->data)->lang == LANG_RUBY) { - ruby_plugin_destroy(curr->data); - } -#endif -#ifdef PROF_HAVE_LUA - if (((ProfPlugin *)curr->data)->lang == LANG_LUA) { - lua_plugin_destroy(curr->data); - } -#endif #ifdef PROF_HAVE_C if (((ProfPlugin *)curr->data)->lang == LANG_C) { c_plugin_destroy(curr->data); @@ -467,15 +395,6 @@ plugins_shutdown(void) curr = g_slist_next(curr); } -#ifdef PROF_HAVE_PYTHON - python_shutdown(); -#endif -#ifdef PROF_HAVE_RUBY - ruby_shutdown(); -#endif -#ifdef PROF_HAVE_LUA - lua_shutdown(); -#endif #ifdef PROF_HAVE_C c_shutdown(); #endif diff --git a/src/plugins/plugins.h b/src/plugins/plugins.h index 034046d0..c633bdd4 100644 --- a/src/plugins/plugins.h +++ b/src/plugins/plugins.h @@ -36,9 +36,6 @@ #define PLUGINS_H typedef enum { - LANG_PYTHON, - LANG_RUBY, - LANG_LUA, LANG_C } lang_t;