From fb0da9d7709057695087f8ca280904c9ef84b11f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 26 Jan 2002 20:03:48 +0000 Subject: Test for error status of shl_findsym. Fixes #505417. 2.2.1 candiate. --- Misc/ACKS | 1 + Python/dynload_hpux.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Misc/ACKS b/Misc/ACKS index e03d7c8..074042d 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -160,6 +160,7 @@ Jonathan Giddy Chris Gonnerman David Goodger Hans de Graaff +Eddy De Greef Duncan Grisby Dag Gruneau Michael Guravage diff --git a/Python/dynload_hpux.c b/Python/dynload_hpux.c index cbdb35a..6aef796 100644 --- a/Python/dynload_hpux.c +++ b/Python/dynload_hpux.c @@ -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); -- cgit v0.12