Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e3d7622

Browse files
committed
Don't fail on importing things with undefined references. Unfortunately we
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.
1 parent dd19cf8 commit e3d7622

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Python/dynload_next.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
148148
break;
149149
}
150150
if (errString == NULL) {
151-
newModule = NSLinkModule(image, pathname, TRUE);
151+
newModule = NSLinkModule(image, pathname,
152+
NSLINKMODULE_OPTION_BINDNOW|NSLINKMODULE_OPTION_RETURN_ON_ERROR);
152153
if (!newModule)
153154
errString = "Failure linking new module";
154155
}

0 commit comments

Comments
 (0)