]> granicus.if.org Git - python/commitdiff
Don't fail on importing things with undefined references. Unfortunately we
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 6 Dec 2001 22:58:56 +0000 (22:58 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 6 Dec 2001 22:58:56 +0000 (22:58 +0000)
still fail on importing modules that link with libraries that fail
their initialization code (such as windowing libraries when we don't have
access to the window server) and that is what I really wanted to fix.

Python/dynload_next.c

index 671b26f2357e3bce8fd8d07bcd09e3231f9f8a63..892bb478424b261086363bf56c955426c3f41a52 100644 (file)
@@ -148,7 +148,8 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
                        break;
                }
                if (errString == NULL) {
-                       newModule = NSLinkModule(image, pathname, TRUE);
+                       newModule = NSLinkModule(image, pathname,
+                               NSLINKMODULE_OPTION_BINDNOW|NSLINKMODULE_OPTION_RETURN_ON_ERROR);
                        if (!newModule)
                                errString = "Failure linking new module";
                }