Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 68742:dc38c4d65cd9
Issue #3080: Fix call to case_ok() in find_init_module()
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Sun, 20 Mar 2011 04:58:29 +0100 |
| parents | f8d6f6797909 |
| children | 7f4a4e393058 |
line wrap: on
line diff
--- a/Python/import.c Sun Mar 20 04:28:55 2011 +0100 +++ b/Python/import.c Sun Mar 20 04:58:29 2011 +0100 @@ -2237,8 +2237,8 @@ if (filename == NULL) return -1; if (_Py_stat(filename, &statbuf) == 0) { - /* 9=len("/__init__") */ - match = case_ok(filename, 9, initstr); + /* 3=len(".py") */ + match = case_ok(filename, -3, initstr); if (match < 0) { Py_DECREF(filename); return -1; @@ -2255,8 +2255,8 @@ if (filename == NULL) return -1; if (_Py_stat(filename, &statbuf) == 0) { - /* 9=len("/__init__") */ - match = case_ok(filename, 9, initstr); + /* 4=len(".pyc") */ + match = case_ok(filename, -4, initstr); if (match < 0) { Py_DECREF(filename); return -1;
