[Python-checkins] cpython: Issue #11051: Reduce the number of syscalls per import.
charles-francois.natali
python-checkins at python.org
Wed Dec 7 19:16:31 CET 2011
http://hg.python.org/cpython/rev/a541bda2f5e2
changeset: 73879:a541bda2f5e2
user: Charles-François Natali <neologix at free.fr>
date: Wed Dec 07 19:16:01 2011 +0100
summary:
Issue #11051: Reduce the number of syscalls per import.
files:
Python/import.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/Python/import.c b/Python/import.c
--- a/Python/import.c
+++ b/Python/import.c
@@ -1944,8 +1944,7 @@
if (Py_VerboseFlag > 1)
PySys_FormatStderr("# trying %R\n", filename);
- if (_Py_stat(filename, &statbuf) == 0 && /* it exists */
- S_ISDIR(statbuf.st_mode)) /* it's a directory */
+ if (_Py_stat(filename, &statbuf) != 0 || S_ISDIR(statbuf.st_mode))
{
Py_DECREF(filename);
continue;
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list