summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-03-20 03:58:29 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-03-20 03:58:29 (GMT)
commitcc9564ecd8cea04e20bd0fac235117cfbb660d6b (patch)
tree0f5826fc18c307dd77966db5bd756a07bc4fca8e /Python
parent1304f2d8a348741c32bbf6970a3381df0fa7fdd1 (diff)
downloadcpython-cc9564ecd8cea04e20bd0fac235117cfbb660d6b.zip
cpython-cc9564ecd8cea04e20bd0fac235117cfbb660d6b.tar.gz
cpython-cc9564ecd8cea04e20bd0fac235117cfbb660d6b.tar.bz2
Issue #3080: Fix call to case_ok() in find_init_module()
Diffstat (limited to 'Python')
-rw-r--r--Python/import.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/import.c b/Python/import.c
index 0194d89..38960b1 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -2237,8 +2237,8 @@ find_init_module(PyObject *directory)
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 @@ find_init_module(PyObject *directory)
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;