diff Modules/_tkinter.c @ 9327:c91e4d87f694 legacy-trunk

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.
author Guido van Rossum <guido@python.org>
date Mon, 12 Oct 1998 16:26:22 +0000
parents 8918e4f54eca
children b0ca2ca586b1
line wrap: on
line diff
--- a/Modules/_tkinter.c	Mon Oct 12 16:07:27 1998 +0000
+++ b/Modules/_tkinter.c	Mon Oct 12 16:26:22 1998 +0000
@@ -1899,9 +1899,6 @@
 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 @@
 #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);