running in a non-threaded environment. He added some #ifdefs that fix
this.
#ifndef MS_WINDOWS
FHANDLE tfile;
#endif
+#ifdef WITH_THREAD
PyEval_RestoreThread(event_tstate);
+#endif
stdin_ready = 0;
errorInCmd = 0;
#ifndef MS_WINDOWS
excInCmd = valInCmd = trbInCmd = NULL;
PyErr_Print();
}
+#ifdef WITH_THREAD
PyEval_SaveThread();
+#endif
return 0;
}
{
#ifdef WAIT_FOR_STDIN
if (PyOS_InputHook == NULL) {
+#ifdef WITH_THREAD
event_tstate = PyThreadState_Get();
+#endif
PyOS_InputHook = EventHook;
}
#endif