Kaydet (Commit) 4df3c528 authored tarafından Jack Jansen's avatar Jack Jansen

Case-checking was broken on the Macintosh. Fixed.

üst fddef433
...@@ -979,13 +979,13 @@ find_module(char *realname, PyObject *path, char *buf, size_t buflen, ...@@ -979,13 +979,13 @@ find_module(char *realname, PyObject *path, char *buf, size_t buflen,
#endif #endif
#ifdef macintosh #ifdef macintosh
fdp = PyMac_FindModuleExtension(buf, &len, name); fdp = PyMac_FindModuleExtension(buf, &len, name);
if (fdp) if (fdp) {
fp = fopen(buf, fdp->mode);
#else #else
for (fdp = _PyImport_Filetab; fdp->suffix != NULL; fdp++) { for (fdp = _PyImport_Filetab; fdp->suffix != NULL; fdp++) {
strcpy(buf+len, fdp->suffix); strcpy(buf+len, fdp->suffix);
if (Py_VerboseFlag > 1) if (Py_VerboseFlag > 1)
PySys_WriteStderr("# trying %s\n", buf); PySys_WriteStderr("# trying %s\n", buf);
#endif /* !macintosh */
fp = fopen(buf, fdp->mode); fp = fopen(buf, fdp->mode);
if (fp != NULL) { if (fp != NULL) {
if (case_ok(buf, len, namelen, name)) if (case_ok(buf, len, namelen, name))
...@@ -996,7 +996,6 @@ find_module(char *realname, PyObject *path, char *buf, size_t buflen, ...@@ -996,7 +996,6 @@ find_module(char *realname, PyObject *path, char *buf, size_t buflen,
} }
} }
} }
#endif /* !macintosh */
if (fp != NULL) if (fp != NULL)
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment