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:
commit
0a146a14d6
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user