Exemple #1
0
void
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_C
        if (((ProfPlugin *)curr->data)->lang == LANG_C) {
            c_plugin_destroy(curr->data);
        }
#endif

        curr = g_slist_next(curr);
    }
#ifdef PROF_HAVE_PYTHON
    python_shutdown();
#endif
#ifdef PROF_HAVE_C
    c_shutdown();
#endif

    autocompleters_destroy();
    plugin_themes_close();
    callbacks_close();
}
/* Call python function to shutdown the script */
static void playlist_python_shutdown(void) {
	PyObject* res;

	if (pl_shutdown_hook) {
		if (!((res = python_eval(pl_shutdown_hook)) && PyInt_Check(res)))
			ices_log_error("ices_shutdown failed");

		Py_XDECREF(res);
	}

	python_shutdown();
}