src/scripting/python/core.c:
void
cleanup_python(struct module *module)
{
if (Py_IsInitialized()) {
python_done_keybinding_interface();
Py_XDECREF(python_hooks);
Py_Finalize();
}
}Now if the Python scripting module is initialized once and cleaned up, and then initialized again but the second initialization fails e.g. because of invalid syntax in hooks.py, I believe python_hooks will retain the value from the first successful initialization. And if the module is then again cleaned up, Py_XDECREF gets called on an object that has already been deleted. A similar problem seems possible in python_done_keybinding_interface. Should the Py_XDECREF calls be changed to Py_CLEAR, or did I misunderstand something? I suppose this won't be a problem before enhancement request 73 (plugins support, http://bugzilla.elinks.cz/show_bug.cgi?id=73) is implemented, but anyway fixing it seems easier than writing it down for later.
pgpvvZvivcHYT.pgp
Description: PGP signature
_______________________________________________ elinks-dev mailing list [email protected] http://linuxfromscratch.org/mailman/listinfo/elinks-dev
