]> granicus.if.org Git - python/commitdiff
Patch #729300: Disable error message if Python is not built for threads.
authorMartin v. Löwis <martin@v.loewis.de>
Thu, 1 May 2003 05:25:29 +0000 (05:25 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Thu, 1 May 2003 05:25:29 +0000 (05:25 +0000)
Python/pystate.c

index 8faf6a09687c608a6151b87a136c5aa995e34639..b083f8cb944b2c37535d48191ec65d815ebaa148 100644 (file)
@@ -264,7 +264,7 @@ PyThreadState_Swap(PyThreadState *new)
           to be used for a thread.  Check this the best we can in debug 
           builds.
        */
-#if defined(Py_DEBUG)
+#if defined(Py_DEBUG) && defined(WITH_THREAD)
        if (new) {
                PyThreadState *check = PyGILState_GetThisThreadState();
                if (check && check != new)