summaryrefslogtreecommitdiffstats
path: root/Python/dynload_aix.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-09-28 22:42:28 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-09-28 22:42:28 (GMT)
commit639418812f11749f99d1160b26325bdfa3a26a6f (patch)
treeeb438b6f5e06b7a5144567ff5c95c190bf850cc1 /Python/dynload_aix.c
parentb9dcffb51e0075f70434febb6ea557cc4d22f5fd (diff)
downloadcpython-639418812f11749f99d1160b26325bdfa3a26a6f.zip
cpython-639418812f11749f99d1160b26325bdfa3a26a6f.tar.gz
cpython-639418812f11749f99d1160b26325bdfa3a26a6f.tar.bz2
Use the new Py_ARRAY_LENGTH macro
Diffstat (limited to 'Python/dynload_aix.c')
-rw-r--r--Python/dynload_aix.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/dynload_aix.c b/Python/dynload_aix.c
index 74c7b32..6287c86 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);
}