"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "plugins/python-loader/gnm-python.c" between
gnumeric-1.12.49.tar.xz and gnumeric-1.12.50.tar.xz

About: Gnumeric - The GNOME office spreadsheet.

gnm-python.c  (gnumeric-1.12.49.tar.xz):gnm-python.c  (gnumeric-1.12.50.tar.xz)
skipping to change at line 74 skipping to change at line 74
gnm_python_obj, NULL); gnm_python_obj, NULL);
} }
static void static void
gnm_python_finalize (GObject *obj) gnm_python_finalize (GObject *obj)
{ {
GnmPython *gpy = GNM_PYTHON (obj); GnmPython *gpy = GNM_PYTHON (obj);
g_source_remove_by_user_data (gnm_python_obj); g_source_remove_by_user_data (gnm_python_obj);
if (gpy->default_interpreter != NULL) { if (gpy->default_interpreter != NULL) {
GO_SLIST_FOREACH (gpy->interpreters, GnmPyInterpreter, interprete GSList *ints = g_slist_copy (gpy->interpreters);
r, GO_SLIST_FOREACH (ints, GnmPyInterpreter, interpreter,
if (interpreter != gpy->default_interpreter) { if (interpreter != gpy->default_interpreter) {
gnm_py_interpreter_destroy (interpreter, gpy->def ault_interpreter); gnm_py_interpreter_destroy (interpreter, gpy->def ault_interpreter);
} }
); );
g_slist_free (ints);
gnm_py_interpreter_switch_to (gpy->default_interpreter); gnm_py_interpreter_switch_to (gpy->default_interpreter);
GO_SLIST_REMOVE (gpy->interpreters, gpy->default_interpreter);
g_object_unref (gpy->default_interpreter); g_object_unref (gpy->default_interpreter);
gpy->default_interpreter = NULL; gpy->default_interpreter = NULL;
} }
gnm_python_obj = NULL; gnm_python_obj = NULL;
parent_class->finalize (obj); parent_class->finalize (obj);
} }
static void static void
gnm_python_class_init (GObjectClass *gobject_class) gnm_python_class_init (GObjectClass *gobject_class)
skipping to change at line 125 skipping to change at line 128
} }
/* ---------- */ /* ---------- */
GnmPython * GnmPython *
gnm_python_object_get (GOErrorInfo **err) gnm_python_object_get (GOErrorInfo **err)
{ {
GO_INIT_RET_ERROR_INFO (err); GO_INIT_RET_ERROR_INFO (err);
if (!Py_IsInitialized ()) { if (!Py_IsInitialized ()) {
PyImport_AppendInittab ("Gnumeric", py_initgnumeric); PyImport_AppendInittab ("Gnumeric", py_initgnumeric);
Py_Initialize (); Py_InitializeEx (1);
#ifdef WITH_THREAD #ifdef WITH_THREAD
PyEval_InitThreads (); PyEval_InitThreads ();
#endif #endif
} }
if (err && *err != NULL) { if (err && *err != NULL) {
Py_Finalize (); Py_Finalize ();
return NULL; return NULL;
} }
if (gnm_python_obj == NULL) { if (gnm_python_obj == NULL) {
 End of changes. 4 change blocks. 
3 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)