]> granicus.if.org Git - python/commitdiff
Fix SF #639945, 64-bit bug on AIX
authorNeal Norwitz <nnorwitz@gmail.com>
Tue, 31 Dec 2002 00:06:24 +0000 (00:06 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Tue, 31 Dec 2002 00:06:24 +0000 (00:06 +0000)
I can't test this on the snake farm (no aix box is working).
This change works for the submitter seems correct.
Can anybody test this on 32- and 64- bit AIX?

Python/dynload_aix.c

index bb26c07248ba7f30553f0fb9840b83144a449e30..fd380aed0efc4c039fe576d3d63d85721b28ce22 100644 (file)
@@ -77,8 +77,7 @@ aix_getoldmodules(void **modlistptr)
                        -- "libpython[version].a" in case it's a shared lib).
                        */
                        offset = (unsigned int)ldiptr->ldinfo_next;
-                       ldiptr = (struct ld_info *)((unsigned int)
-                                                   ldiptr + offset);
+                       ldiptr = (struct ld_info *)((char*)ldiptr + offset);
                        continue;
                }
                if ((modptr = (ModulePtr)malloc(sizeof(Module))) == NULL) {
@@ -98,7 +97,7 @@ aix_getoldmodules(void **modlistptr)
                        prevmodptr->next = modptr;
                prevmodptr = modptr;
                offset = (unsigned int)ldiptr->ldinfo_next;
-               ldiptr = (struct ld_info *)((unsigned int)ldiptr + offset);
+               ldiptr = (struct ld_info *)((char*)ldiptr + offset);
        } while (offset);
        free(ldibuf);
        return 0;