Problem: State specific to the Python thread is discarded.
Solution: Keep state between threads. (Paul)
#else
PyMac_Initialize();
#endif
- /* initialise threads */
+ /* Initialise threads and save the state using PyGILState_Ensure.
+ * Without this call, thread-specific state (such as the system trace
+ * hook), will be lost between invocations of Python code. */
PyEval_InitThreads();
-
+ pygilstate = PyGILState_Ensure();
#ifdef DYNAMIC_PYTHON
get_exceptions();
#endif
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 691,
/**/
690,
/**/