From: Guido van Rossum Date: Fri, 10 Oct 1997 17:40:00 +0000 (+0000) Subject: Shared libraries didn't quite work under AIX because of the change in X-Git-Tag: v1.5b1~202 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b31cd2fe752bea547a53da870e7978dc36266d2;p=python Shared libraries didn't quite work under AIX because of the change in status of the GNU readline interface. Here's a patch, by Vladimir Marangozov. --- diff --git a/Python/importdl.c b/Python/importdl.c index 3f715dec83..fffe2654e7 100644 --- a/Python/importdl.c +++ b/Python/importdl.c @@ -599,6 +599,17 @@ aix_getoldmodules(modlistptr) ldiptr = (struct ld_info *)ldibuf; prevmodptr = NULL; do { + if (strstr(ldiptr->ldinfo_filename, "python") == NULL) { + /* + -- Extract only the modules containing "python" as a + -- substring, like the "python[version]" executable or + -- "libpython[version].a" in case python is embedded. + */ + offset = (unsigned int)ldiptr->ldinfo_next; + ldiptr = (struct ld_info *)((unsigned int) + ldiptr + offset); + continue; + } if ((modptr = (ModulePtr)malloc(sizeof(Module))) == NULL) { PyErr_SetString(PyExc_ImportError, strerror(errno)); while (*modlistptr) {