Commit 9a61dc90 authored by Guido van Rossum's avatar Guido van Rossum

Moved mac-specific speedup to a different place (Jack)

parent ac1fc95c
...@@ -709,11 +709,6 @@ find_module(name, path, buf, buflen, p_fp) ...@@ -709,11 +709,6 @@ find_module(name, path, buf, buflen, p_fp)
#endif #endif
) )
buf[len++] = SEP; buf[len++] = SEP;
#ifdef macintosh
fdp = PyMac_FindModuleExtension(buf, &len, name);
if ( fdp )
fp = fopen(buf, fdp->mode);
#else
#ifdef IMPORT_8x3_NAMES #ifdef IMPORT_8x3_NAMES
/* see if we are searching in directory dos_8x3 */ /* see if we are searching in directory dos_8x3 */
if (len > 7 && !strncmp(buf + len - 8, "dos_8x3", 7)){ if (len > 7 && !strncmp(buf + len - 8, "dos_8x3", 7)){
...@@ -740,6 +735,11 @@ find_module(name, path, buf, buflen, p_fp) ...@@ -740,6 +735,11 @@ find_module(name, path, buf, buflen, p_fp)
#else #else
/* XXX How are you going to test for directories? */ /* XXX How are you going to test for directories? */
#endif #endif
#ifdef macintosh
fdp = PyMac_FindModuleExtension(buf, &len, name);
if (fdp)
fp = fopen(buf, fdp->mode);
#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)
......
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