]> granicus.if.org Git - python/commitdiff
Test for error status of shl_findsym. Fixes #505417. 2.2.1 candiate.
authorMartin v. Löwis <martin@v.loewis.de>
Sat, 26 Jan 2002 20:03:48 +0000 (20:03 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sat, 26 Jan 2002 20:03:48 +0000 (20:03 +0000)
Misc/ACKS
Python/dynload_hpux.c

index e03d7c8c54e48b3049876ab4edd90da07b703195..074042db78338a8f3dadc722f36330888f538ad0 100644 (file)
--- 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
index cbdb35a240ad1dc1ad311692c1aa2442128596b3..6aef796f1149ffe5c693ae8e842ea3a497494907 100644 (file)
@@ -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);