0
0
mirror of https://github.com/python/cpython.git synced 2024-12-01 11:15:56 +01:00

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.
This commit is contained in:
Guido van Rossum 1998-10-12 16:26:22 +00:00
parent 69ef7d6220
commit 41f0a98f8f

View File

@ -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);