Mercurial > cpython-lru_cache-weakref
diff Modules/_tkinter.c @ 9488:b0ca2ca586b1 legacy-trunk
RajGopal Srinivasan noted that the latest code doesn't work when
running in a non-threaded environment. He added some #ifdefs that fix
this.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 17 Nov 1998 03:45:24 +0000 |
| parents | c91e4d87f694 |
| children | 38023a425e48 |
line wrap: on
line diff
--- a/Modules/_tkinter.c Mon Nov 16 22:46:30 1998 +0000 +++ b/Modules/_tkinter.c Tue Nov 17 03:45:24 1998 +0000 @@ -1902,7 +1902,9 @@ #ifndef MS_WINDOWS FHANDLE tfile; #endif +#ifdef WITH_THREAD PyEval_RestoreThread(event_tstate); +#endif stdin_ready = 0; errorInCmd = 0; #ifndef MS_WINDOWS @@ -1945,7 +1947,9 @@ excInCmd = valInCmd = trbInCmd = NULL; PyErr_Print(); } +#ifdef WITH_THREAD PyEval_SaveThread(); +#endif return 0; } @@ -1956,7 +1960,9 @@ { #ifdef WAIT_FOR_STDIN if (PyOS_InputHook == NULL) { +#ifdef WITH_THREAD event_tstate = PyThreadState_Get(); +#endif PyOS_InputHook = EventHook; } #endif
