mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Temporarily get rid of the registration of Tcl_Finalize() as a
low-level Python exit handler. This can attempt to call Python code at a point that the interpreter and thread state have already been destroyed, causing a Bus Error. Given the intended use of Py_AtExit(), I'm not convinced that it's a good idea to call it earlier during Python's finalization sequence... (Although this is the only use for it in the entire distribution.)
This commit is contained in:
parent
69a79bca68
commit
43ff8683fe
1 changed files with 5 additions and 0 deletions
|
@ -2030,9 +2030,14 @@ init_tkinter()
|
|||
if (PyErr_Occurred())
|
||||
return;
|
||||
|
||||
#if 0
|
||||
/* This was not a good idea; through <Destroy> bindings,
|
||||
Tcl_Finalize() may invoke Python code but at that point the
|
||||
interpreter and thread state have already been destroyed! */
|
||||
#if TKMAJORMINOR >= 8000
|
||||
Py_AtExit(Tcl_Finalize);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef macintosh
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue