diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-09-29 00:42:28 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-09-29 00:42:28 +0200 |
commit | 687c3b16f72a6b2b64971c1c27e33e27f001ede8 (patch) | |
tree | 9d9c6bedbf5f51f26a5f03a522eedddb852a3679 /Python/codecs.c | |
parent | ea8093a66d771ae68b016c578c7b44be51c819b1 (diff) | |
download | cpython-687c3b16f72a6b2b64971c1c27e33e27f001ede8.tar.gz |
Use the new Py_ARRAY_LENGTH macro
Diffstat (limited to 'Python/codecs.c')
-rw-r--r-- | Python/codecs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/codecs.c b/Python/codecs.c index be2e8334c6..4c2fc5d722 100644 --- a/Python/codecs.c +++ b/Python/codecs.c @@ -1044,7 +1044,7 @@ static int _PyCodecRegistry_Init(void) interp->codec_error_registry = PyDict_New(); if (interp->codec_error_registry) { - for (i = 0; i < sizeof(methods)/sizeof(methods[0]); ++i) { + for (i = 0; i < Py_ARRAY_LENGTH(methods); ++i) { PyObject *func = PyCFunction_New(&methods[i].def, NULL); int res; if (!func) |