Commit 01873d72 authored by Tom Dyas's avatar Tom Dyas
Browse files

Sync to plugin API changes. This plugin cannot be removed for now.

parent 1cb2421e
......@@ -159,11 +159,21 @@ initgnumeric(void)
g_print("gnumeric module initialized\n");
}
static int
no_unloading_for_me(PluginData *pd)
{
return 0;
}
int
init_plugin(PluginData * pd)
{
PyObject *m, *d, *f;
pd->can_unload = no_unloading_for_me;
pd->title = g_strdup("Python Plugin");
/* initialize the python interpreter */
Py_SetProgramName("gnumeric");
Py_Initialize();
......@@ -177,8 +187,6 @@ init_plugin(PluginData * pd)
/* plugin stuff */
pd->title = g_strdup("Python Plugin");
/* run the magic python file */
/* XXX should run single Python file in system directory. This file would
* then contain policy for the loading the remainder of the Python
......@@ -200,13 +208,3 @@ init_plugin(PluginData * pd)
return 0;
}
void cleanup_plugin(PluginData *pd)
{
/* XXX Unloading the Plugin will crash gnumeric right now :) */
/* XXX Plugin API needs to support a "can_unload" function instead of
* the lame reference count.
*/
g_free(pd->title);
Py_Finalize();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment