summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-10-30 13:08:39 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-10-30 13:08:39 (GMT)
commit550fdae2f5bb1cdff849c3f47c1ae7c2b780e83b (patch)
tree2aaf39df2896980fd574a417f52f373f757faf49
parent99de218cfc55308d73f3e0be8bcc95f00903fe91 (diff)
downloadcpython-550fdae2f5bb1cdff849c3f47c1ae7c2b780e83b.zip
cpython-550fdae2f5bb1cdff849c3f47c1ae7c2b780e83b.tar.gz
cpython-550fdae2f5bb1cdff849c3f47c1ae7c2b780e83b.tar.bz2
On the macintosh don't take a quick exit in find_module() for frozen submodule imports: the frozen import goes through a different mechanism.
-rw-r--r--Python/import.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c
index 81b5067..9f668bf 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -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)) {