mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Issue #3080: Fix call to case_ok() in find_init_module()
This commit is contained in:
parent
1304f2d8a3
commit
cc9564ecd8
1 changed files with 4 additions and 4 deletions
|
@ -2237,8 +2237,8 @@ find_init_module(PyObject *directory)
|
||||||
if (filename == NULL)
|
if (filename == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
if (_Py_stat(filename, &statbuf) == 0) {
|
if (_Py_stat(filename, &statbuf) == 0) {
|
||||||
/* 9=len("/__init__") */
|
/* 3=len(".py") */
|
||||||
match = case_ok(filename, 9, initstr);
|
match = case_ok(filename, -3, initstr);
|
||||||
if (match < 0) {
|
if (match < 0) {
|
||||||
Py_DECREF(filename);
|
Py_DECREF(filename);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -2255,8 +2255,8 @@ find_init_module(PyObject *directory)
|
||||||
if (filename == NULL)
|
if (filename == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
if (_Py_stat(filename, &statbuf) == 0) {
|
if (_Py_stat(filename, &statbuf) == 0) {
|
||||||
/* 9=len("/__init__") */
|
/* 4=len(".pyc") */
|
||||||
match = case_ok(filename, 9, initstr);
|
match = case_ok(filename, -4, initstr);
|
||||||
if (match < 0) {
|
if (match < 0) {
|
||||||
Py_DECREF(filename);
|
Py_DECREF(filename);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue