Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 48920:176c409fd747 legacy-trunk
Fix compilation when --without-threads is given #3683
Reviewer: Georg Brandl, Benjamin Peterson
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Mon, 01 Sep 2008 14:18:30 +0000 |
| parents | 53ade9e68b56 |
| children | 617199769bd3 94e79d78dff0 |
line wrap: on
line diff
--- a/Python/import.c Mon Sep 01 14:15:55 2008 +0000 +++ b/Python/import.c Mon Sep 01 14:18:30 2008 +0000 @@ -2029,7 +2029,7 @@ 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 @@ name); return NULL; } +#else + return PyImport_ImportModule(name); +#endif } /* Forward declarations for helper routines */
