]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix compilation when --without-threads is given #3683
authorBenjamin Peterson <benjamin@python.org>
Mon, 1 Sep 2008 14:18:30 +0000 (14:18 +0000)
committerBenjamin Peterson <benjamin@python.org>
Mon, 1 Sep 2008 14:18:30 +0000 (14:18 +0000)
Reviewer: Georg Brandl, Benjamin Peterson

Misc/NEWS
Python/import.c

index 5ccce4b3baf31d0ec65b72e0741f88b62a5ed5bd..99c32b53d1b28c8ade25aa2aaa8489bb5b3be029 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,8 @@ What's New in Python 2.6 release candidate 1?
 Core and Builtins
 -----------------
 
+- Issue #3683: Fix compilation when --without-threads is given.
+
 - Issue #3668: Fix a memory leak with the "s*" argument parser in
   PyArg_ParseTuple and friends, which occurred when the argument for "s*" 
   was correctly parsed but parsing of subsequent arguments failed.
@@ -52,8 +54,8 @@ Library
 
 - Fixed two format strings in the _collections module.
 
-- #3703 _fileio.FileIO gave unhelpful error message when trying to open a
-   directory.
+- Issue #3703: _fileio.FileIO gave unhelpful error message when trying to open a
+  directory.
 
 Extension Modules
 -----------------
index fd1315442a6bc7f77dc208bfe4bbc7b4c5d42c10..781bb48c6dc5c63c0610933dab1258d4aa11171b 100644 (file)
@@ -2029,7 +2029,7 @@ PyImport_ImportModuleNoBlock(const char *name)
        else {
                PyErr_Clear();
        }
-
+#ifdef WITH_THREAD
        /* check the import lock
         * me might be -1 but I ignore the error here, the lock function
         * takes care of the problem */
@@ -2045,6 +2045,9 @@ PyImport_ImportModuleNoBlock(const char *name)
                             name);
                return NULL;
        }
+#else
+       return PyImport_ImportModule(name);
+#endif
 }
 
 /* Forward declarations for helper routines */