diff Python/pystate.c @ 35095:8341cefdecac legacy-trunk

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 :).
author Michael W. Hudson <mwh@python.net>
date Thu, 16 Jun 2005 11:35:00 +0000
parents 9857daa22807
children 7ea2be2c0e1d
line wrap: on
line diff
--- a/Python/pystate.c	Wed Jun 15 18:46:50 2005 +0000
+++ b/Python/pystate.c	Thu Jun 16 11:35:00 2005 +0000
@@ -289,7 +289,7 @@
 #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