diff options
Diffstat (limited to 'plugins/pychrysa/plugin.c')
-rw-r--r-- | plugins/pychrysa/plugin.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/plugins/pychrysa/plugin.c b/plugins/pychrysa/plugin.c index 651de7d..7d44f10 100644 --- a/plugins/pychrysa/plugin.c +++ b/plugins/pychrysa/plugin.c @@ -71,7 +71,7 @@ static void g_python_plugin_init(GPythonPlugin *); static bool g_python_plugin_read_interface(GPythonPlugin *); /* Procède à l'initialisation du greffon. */ -static bool g_python_plugin_do_init(GPythonPlugin *, GObject *); +static bool g_python_plugin_do_init(GPythonPlugin *); /* Procède à l'extinction du greffon. */ static bool g_python_plugin_do_exit(GPythonPlugin *, GObject *); @@ -141,7 +141,6 @@ static void g_python_plugin_init(GPythonPlugin *plugin) * * * Paramètres : modname = nom du module à charger. * * filename = chemin d'accès au code Python à charger. * -* ref = espace de référencement global. * * * * Description : Crée un greffon à partir de code Python. * * * @@ -151,7 +150,7 @@ static void g_python_plugin_init(GPythonPlugin *plugin) * * ******************************************************************************/ -GPluginModule *g_python_plugin_new(const char *modname, const char *filename, GObject *ref) +GPluginModule *g_python_plugin_new(const char *modname, const char *filename) { GPythonPlugin *result; /* Structure à retourner */ PyObject *name; /* Chemin d'accès pour Python */ @@ -346,7 +345,7 @@ GPluginModule *g_python_plugin_new(const char *modname, const char *filename, GO /* Conclusion */ - if (!g_plugin_module_load(G_PLUGIN_MODULE(result), ref)) + if (!g_plugin_module_load(G_PLUGIN_MODULE(result))) goto gppn_bad_plugin; return G_PLUGIN_MODULE(result); @@ -485,18 +484,18 @@ static bool g_python_plugin_read_interface(GPythonPlugin *plugin) * * ******************************************************************************/ -static bool g_python_plugin_do_init(GPythonPlugin *plugin, GObject *ref) +static bool g_python_plugin_do_init(GPythonPlugin *plugin) { bool result; /* Bilan à retourner */ PyObject *args; /* Arguments pour l'appel */ PyObject *value; /* Valeur obtenue */ - args = PyTuple_New(1); - PyTuple_SetItem(args, 0, pygobject_new(ref)); + args = Py_None; + Py_INCREF(args); value = run_python_method(plugin->instance, "init", args); - result = PyObject_IsTrue(value); + result = (value != NULL && PyObject_IsTrue(value)); Py_XDECREF(value); Py_DECREF(args); |