From 3046647478f584b665a33c3a1c3d1d6117979d64 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 22 Feb 2011 23:16:19 +0000 Subject: Issue #3080: Remove unused argument of _PyImport_GetDynLoadFunc() The first argument, fqname, was not used. --- Python/dynload_aix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/dynload_aix.c') diff --git a/Python/dynload_aix.c b/Python/dynload_aix.c index 149990d799..74c7b32603 100644 --- a/Python/dynload_aix.c +++ b/Python/dynload_aix.c @@ -154,7 +154,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; -- cgit v1.2.1 From 687c3b16f72a6b2b64971c1c27e33e27f001ede8 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 29 Sep 2011 00:42:28 +0200 Subject: Use the new Py_ARRAY_LENGTH macro --- Python/dynload_aix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Python/dynload_aix.c') diff --git a/Python/dynload_aix.c b/Python/dynload_aix.c index 74c7b32603..6287c86edf 100644 --- a/Python/dynload_aix.c +++ b/Python/dynload_aix.c @@ -129,7 +129,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 +139,7 @@ aix_loaderror(const char *pathname) } for(i = 0; message[i] && *message[i]; i++) { int nerr = atoi(message[i]); - for (j=0; j Date: Mon, 20 Feb 2012 19:41:11 +0100 Subject: Issue #14040: Remove rarely used file name suffixes for C extensions (under POSIX mainly). This will improve import performance a bit (especially under importlib). --- Python/dynload_aix.c | 1 - 1 file changed, 1 deletion(-) (limited to 'Python/dynload_aix.c') diff --git a/Python/dynload_aix.c b/Python/dynload_aix.c index 6287c86edf..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} }; -- cgit v1.2.1 From 9750b728bb2c8b091f2919aecedc465c03de70a8 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 20 Apr 2012 15:31:11 -0400 Subject: Issue #14599: Support ImportError.path on AIX and HPUX when loading extension modules. --- Python/dynload_aix.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Python/dynload_aix.c') diff --git a/Python/dynload_aix.c b/Python/dynload_aix.c index 8346f065e3..9e8f536a3c 100644 --- a/Python/dynload_aix.c +++ b/Python/dynload_aix.c @@ -108,6 +108,8 @@ aix_loaderror(const char *pathname) { char *message[1024], errbuf[1024]; + PyObject *pathname_ob = NULL; + PyObject *errbuf_ob = NULL; register int i,j; struct errtab { @@ -147,7 +149,11 @@ aix_loaderror(const char *pathname) ERRBUF_APPEND("\n"); } errbuf[strlen(errbuf)-1] = '\0'; /* trim off last newline */ - PyErr_SetString(PyExc_ImportError, errbuf); + pathname_ob = PyUnicode_FromString(pathname); + errbuf_ob = PyUnicode_FromString(errbuf); + PyErr_SetImportError(errbuf_ob, NULL, pathname); + Py_DECREF(pathname_ob); + Py_DECREF(errbuf_ob); return; } -- cgit v1.2.1 From f9e12fdf7205afea929ddb2b8f6e950721c831bf Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 4 May 2012 15:20:40 -0400 Subject: Issue #13959: Re-implement imp.get_suffixes() in Lib/imp.py. This introduces a new function, imp.extension_suffixes(), which is currently undocumented. That is forthcoming once issue #14657 is resolved and how to expose file suffixes is decided. --- Python/dynload_aix.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'Python/dynload_aix.c') diff --git a/Python/dynload_aix.c b/Python/dynload_aix.c index 9e8f536a3c..b4f71f291a 100644 --- a/Python/dynload_aix.c +++ b/Python/dynload_aix.c @@ -26,10 +26,7 @@ typedef struct Module { void *entry; } Module, *ModulePtr; -const struct filedescr _PyImport_DynLoadFiletab[] = { - {".so", "rb", C_EXTENSION}, - {0, 0} -}; +const char *_PyImport_DynLoadFiletab[] = {".so", NULL}; static int aix_getoldmodules(void **modlistptr) -- cgit v1.2.1