From ba2cf078d2bd8705f61afda7081522981674882e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 21 Nov 2002 23:53:25 +0000 Subject: [PATCH] Properly compute array size even for --disable-unicode. --- Python/codecs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/codecs.c b/Python/codecs.c index 9302a3d8707..ec0daf380bf 100644 --- a/Python/codecs.c +++ b/Python/codecs.c @@ -822,7 +822,7 @@ void _PyCodecRegistry_Init(void) _PyCodec_ErrorRegistry = PyDict_New(); if (_PyCodec_ErrorRegistry) { - for (i = 0; i < 5; ++i) { + for (i = 0; i < sizeof(methods)/sizeof(methods[0]); ++i) { PyObject *func = PyCFunction_New(&methods[i].def, NULL); int res; if (!func)