summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael W. Hudson <mwh@python.net>2005-06-16 11:35:00 (GMT)
committerMichael W. Hudson <mwh@python.net>2005-06-16 11:35:00 (GMT)
commit867f2d45cd9906a323c7eff7cf5d43c128038ad6 (patch)
treed9b2845cfd59c67bc2b8ffd881d27862d600e8bf
parentb5e7ff4aeb0eb17c27114523768ae6597e189c7c (diff)
downloadcpython-867f2d45cd9906a323c7eff7cf5d43c128038ad6.zip
cpython-867f2d45cd9906a323c7eff7cf5d43c128038ad6.tar.gz
cpython-867f2d45cd9906a323c7eff7cf5d43c128038ad6.tar.bz2
You can have more than one thread state for a thread if they
correspond to different interpreters (I hope, please revert if this is wrong :).
-rw-r--r--Python/pystate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index abca8dd..e2cf7c5 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -289,7 +289,7 @@ PyThreadState_Swap(PyThreadState *new)
#if defined(Py_DEBUG) && defined(WITH_THREAD)
if (new) {
PyThreadState *check = PyGILState_GetThisThreadState();
- if (check && check != new)
+ if (check && check->interp == new->interp && check != new)
Py_FatalError("Invalid thread state for this thread");
}
#endif