1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-08-25 21:44:47 -04:00

Merge with master

This commit is contained in:
Witold Filipczyk 2006-12-13 18:09:43 +01:00 committed by Witold Filipczyk
commit 0a146a14d6
2 changed files with 16 additions and 2 deletions

View File

@ -209,8 +209,16 @@ void
cleanup_python(struct module *module)
{
if (Py_IsInitialized()) {
PyObject *temp;
python_done_keybinding_interface();
Py_XDECREF(python_hooks);
/* This is equivalent to Py_CLEAR(), but it works with older
* versions of Python predating that macro: */
temp = python_hooks;
python_hooks = NULL;
Py_XDECREF(temp);
Py_Finalize();
}
}

View File

@ -194,5 +194,11 @@ python_init_keybinding_interface(PyObject *dict, PyObject *name)
void
python_done_keybinding_interface(void)
{
Py_XDECREF(keybindings);
PyObject *temp;
/* This is equivalent to Py_CLEAR(), but it works with older
* versions of Python predating that macro: */
temp = keybindings;
keybindings = NULL;
Py_XDECREF(temp);
}