Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 20768:7b0546ee4789 legacy-trunk
On the macintosh don't take a quick exit in find_module() for frozen submodule imports: the frozen import goes through a different mechanism.
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Tue, 30 Oct 2001 13:08:39 +0000 |
| parents | 3fb403eaede1 |
| children | 4a9a9cc041de |
line wrap: on
line diff
--- a/Python/import.c Tue Oct 30 06:23:14 2001 +0000 +++ b/Python/import.c Tue Oct 30 13:08:39 2001 +0000 @@ -893,6 +893,13 @@ strcat(buf, "."); strcat(buf, name); strcpy(name, buf); +#ifdef macintosh + /* Freezing on the mac works different, and the modules are + ** actually on sys.path. So we don't take the quick exit but + ** continue with the normal flow. + */ + path = NULL; +#else if (find_frozen(name) != NULL) { strcpy(buf, name); return &fd_frozen; @@ -900,6 +907,7 @@ PyErr_Format(PyExc_ImportError, "No frozen submodule named %.200s", name); return NULL; +#endif } if (path == NULL) { if (is_builtin(name)) {
