From 639418812f11749f99d1160b26325bdfa3a26a6f 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/codecs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/codecs.c') 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) -- cgit v1.2.1