Commit cb651191 authored by Martin v. Löwis's avatar Martin v. Löwis

Test for error status of shl_findsym. Fixes #505417. 2.2.1 candiate.

parent d477f9e6
......@@ -160,6 +160,7 @@ Jonathan Giddy
Chris Gonnerman
David Goodger
Hans de Graaff
Eddy De Greef
Duncan Grisby
Dag Gruneau
Michael Guravage
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment