Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7b8e35e

Browse files
committed
Fix SF #639945, 64-bit bug on AIX
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?
1 parent d8b5e3f commit 7b8e35e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Python/dynload_aix.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ aix_getoldmodules(void **modlistptr)
7777
-- "libpython[version].a" in case it's a shared lib).
7878
*/
7979
offset = (unsigned int)ldiptr->ldinfo_next;
80-
ldiptr = (struct ld_info *)((unsigned int)
81-
ldiptr + offset);
80+
ldiptr = (struct ld_info *)((char*)ldiptr + offset);
8281
continue;
8382
}
8483
if ((modptr = (ModulePtr)malloc(sizeof(Module))) == NULL) {
@@ -98,7 +97,7 @@ aix_getoldmodules(void **modlistptr)
9897
prevmodptr->next = modptr;
9998
prevmodptr = modptr;
10099
offset = (unsigned int)ldiptr->ldinfo_next;
101-
ldiptr = (struct ld_info *)((unsigned int)ldiptr + offset);
100+
ldiptr = (struct ld_info *)((char*)ldiptr + offset);
102101
} while (offset);
103102
free(ldibuf);
104103
return 0;

0 commit comments

Comments
 (0)