From 17f03ca9628d358628efcb91667b598c1f1e7980 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 1 Sep 2008 14:18:30 +0000 Subject: Fix compilation when --without-threads is given #3683 Reviewer: Georg Brandl, Benjamin Peterson --- Python/import.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Python') 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 */ -- cgit v1.2.1