mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
Test for error status of shl_findsym. Fixes #505417. 2.2.1 candiate.
This commit is contained in:
parent
902952b910
commit
fb0da9d770
2 changed files with 5 additions and 1 deletions
|
@ -47,7 +47,10 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
|
|||
PyOS_snprintf(funcname, sizeof(funcname), FUNCNAME_PATTERN, shortname);
|
||||
if (Py_VerboseFlag)
|
||||
printf("shl_findsym %s\n", funcname);
|
||||
shl_findsym(&lib, funcname, TYPE_UNDEFINED, (void *) &p);
|
||||
if (shl_findsym(&lib, funcname, TYPE_UNDEFINED, (void *) &p) == -1) {
|
||||
shl_unload(lib);
|
||||
p = NULL;
|
||||
}
|
||||
if (p == NULL && Py_VerboseFlag)
|
||||
perror(funcname);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue