]> granicus.if.org Git - python/commitdiff
On the macintosh don't take a quick exit in find_module() for frozen submodule import...
authorJack Jansen <jack.jansen@cwi.nl>
Tue, 30 Oct 2001 13:08:39 +0000 (13:08 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Tue, 30 Oct 2001 13:08:39 +0000 (13:08 +0000)
Python/import.c

index 81b506763a74f0b24f7d10dcead3122bbd3d8a91..9f668bfcdef3c7441976abfd90183a9ef0037683 100644 (file)
@@ -893,6 +893,13 @@ find_module(char *realname, PyObject *path, char *buf, size_t buflen,
                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 @@ find_module(char *realname, PyObject *path, char *buf, size_t buflen,
                PyErr_Format(PyExc_ImportError,
                             "No frozen submodule named %.200s", name);
                return NULL;
+#endif
        }
        if (path == NULL) {
                if (is_builtin(name)) {