diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-09-01 14:18:30 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-09-01 14:18:30 +0000 |
commit | 1e1d0483453589c32c10376cb95dad53c749a875 (patch) | |
tree | e7c9878c54eadf69640422c008961099cb546fa3 | |
parent | 6cff491dad3fb21bb653f24a8201f2e4f24ff306 (diff) | |
download | cpython-1e1d0483453589c32c10376cb95dad53c749a875.tar.gz |
Fix compilation when --without-threads is given #3683
Reviewer: Georg Brandl, Benjamin Peterson
-rw-r--r-- | Misc/NEWS | 6 | ||||
-rw-r--r-- | Python/import.c | 5 |
2 files changed, 8 insertions, 3 deletions
@@ -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 ----------------- diff --git a/Python/import.c b/Python/import.c index fd1315442a..781bb48c6d 100644 --- a/Python/import.c +++ b/Python/import.c @@ -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 */ |