diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-11-28 19:09:45 +0100 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-11-28 19:09:45 +0100 |
commit | 3a852cd214d726eb2bb96f94e498eda7ba042887 (patch) | |
tree | 71081d83765f4c721093b504ca9bd3b7673d41cd /Python/dynload_aix.c | |
parent | 07ee349b41ca8f94aadaf39be3ec9ca5aca692f9 (diff) | |
parent | 07b3714e5b40f0208a7640d315213a479d3742a0 (diff) | |
download | cpython-3a852cd214d726eb2bb96f94e498eda7ba042887.tar.gz |
Issue #7111: Python can now be run without a stdin, stdout or stderr stream.
It was already the case with Python 2. However, the corresponding
sys module entries are now set to None (instead of an unusable file object).
Diffstat (limited to 'Python/dynload_aix.c')
-rw-r--r-- | Python/dynload_aix.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/dynload_aix.c b/Python/dynload_aix.c index 149990d799..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<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 +153,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; |