diff options
author | Mark Dickinson <mdickinson@enthought.com> | 2012-04-15 15:12:37 +0100 |
---|---|---|
committer | Mark Dickinson <mdickinson@enthought.com> | 2012-04-15 15:12:37 +0100 |
commit | 0276a326e15ced5fe6494d40658e9652ac90c5d5 (patch) | |
tree | a6b2218dbfd8082a7976f7ae7b22c7e138a201a0 /Python/dynload_aix.c | |
parent | 4536a907e314836a320414ee5bf3bf7557fef7b6 (diff) | |
parent | 3cd6793317074f286add6fff3627776fe3a50483 (diff) | |
download | cpython-0276a326e15ced5fe6494d40658e9652ac90c5d5.tar.gz |
Issue #13889: Merge fix from 3.2.
Diffstat (limited to 'Python/dynload_aix.c')
-rw-r--r-- | Python/dynload_aix.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Python/dynload_aix.c b/Python/dynload_aix.c index 149990d799..8346f065e3 100644 --- a/Python/dynload_aix.c +++ b/Python/dynload_aix.c @@ -28,7 +28,6 @@ typedef struct Module { const struct filedescr _PyImport_DynLoadFiletab[] = { {".so", "rb", C_EXTENSION}, - {"module.so", "rb", C_EXTENSION}, {0, 0} }; @@ -129,7 +128,6 @@ aix_loaderror(const char *pathname) {L_ERROR_ERRNO, NULL} }; -#define LOAD_ERRTAB_LEN (sizeof(load_errtab)/sizeof(load_errtab[0])) #define ERRBUF_APPEND(s) strncat(errbuf, s, sizeof(errbuf)-strlen(errbuf)-1) PyOS_snprintf(errbuf, sizeof(errbuf), "from module %.200s ", pathname); @@ -140,7 +138,7 @@ aix_loaderror(const char *pathname) } for(i = 0; message[i] && *message[i]; i++) { int nerr = atoi(message[i]); - for (j=0; j<LOAD_ERRTAB_LEN ; j++) { + for (j=0; j < Py_ARRAY_LENGTH(load_errtab); j++) { if (nerr == load_errtab[j].errNo && load_errtab[j].errstr) ERRBUF_APPEND(load_errtab[j].errstr); } @@ -154,7 +152,7 @@ aix_loaderror(const char *pathname) } -dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname, +dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname, const char *pathname, FILE *fp) { dl_funcptr p; |