mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-13 00:38:32 -04:00
Merge with master
This commit is contained in:
commit
0a146a14d6
@ -209,8 +209,16 @@ void
|
|||||||
cleanup_python(struct module *module)
|
cleanup_python(struct module *module)
|
||||||
{
|
{
|
||||||
if (Py_IsInitialized()) {
|
if (Py_IsInitialized()) {
|
||||||
|
PyObject *temp;
|
||||||
|
|
||||||
python_done_keybinding_interface();
|
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();
|
Py_Finalize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -194,5 +194,11 @@ python_init_keybinding_interface(PyObject *dict, PyObject *name)
|
|||||||
void
|
void
|
||||||
python_done_keybinding_interface(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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user