summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-10-12 16:26:22 (GMT)
committerGuido van Rossum <guido@python.org>1998-10-12 16:26:22 (GMT)
commit41f0a98f8f22d37ce721aa0a5d4285b3e4b2e7d7 (patch)
treeb7bdfc3d09b8b71e1a47ed6142aa9606ab0c9e3d
parent69ef7d6220f25b676f0db4bca9058d634ccf642f (diff)
downloadcpython-41f0a98f8f22d37ce721aa0a5d4285b3e4b2e7d7.zip
cpython-41f0a98f8f22d37ce721aa0a5d4285b3e4b2e7d7.tar.gz
cpython-41f0a98f8f22d37ce721aa0a5d4285b3e4b2e7d7.tar.bz2
Looks like I didn't test this interactively. The EventHook() code was
broken; it asked for the current thread state when there was none. Fixed by using the saved event_tstate.
-rw-r--r--Modules/_tkinter.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index b5be260..5939a06 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -1899,9 +1899,6 @@ static PyThreadState *event_tstate = NULL;
static int
EventHook()
{
-#if defined(WITH_THREAD) || defined(MS_WINDOWS)
- PyThreadState *tstate = PyThreadState_Get();
-#endif
#ifndef MS_WINDOWS
FHANDLE tfile;
#endif
@@ -1923,7 +1920,7 @@ EventHook()
#if defined(WITH_THREAD) || defined(MS_WINDOWS)
Py_BEGIN_ALLOW_THREADS
acquire_lock(tcl_lock, 1);
- tcl_tstate = tstate;
+ tcl_tstate = event_tstate;
result = Tcl_DoOneEvent(TCL_DONT_WAIT);