summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-09-01 14:18:30 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-09-01 14:18:30 (GMT)
commit17f03ca9628d358628efcb91667b598c1f1e7980 (patch)
tree14005b36b88eaef661af9ceea30a9669b08d1db2 /Python/import.c
parent2ba93210e2bd8e96d1a61c4446de00e3b61e7c84 (diff)
downloadcpython-17f03ca9628d358628efcb91667b598c1f1e7980.zip
cpython-17f03ca9628d358628efcb91667b598c1f1e7980.tar.gz
cpython-17f03ca9628d358628efcb91667b598c1f1e7980.tar.bz2
Fix compilation when --without-threads is given #3683
Reviewer: Georg Brandl, Benjamin Peterson
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c
index fd13154..781bb48 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 */