summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-11-21 23:53:25 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-11-21 23:53:25 (GMT)
commitba2cf078d2bd8705f61afda7081522981674882e (patch)
tree2e74b2d5f30b3c9b4909c33081256e52a9ec7208 /Python
parent0073f2e42865766d1de6472b49a9181cef49a4d9 (diff)
downloadcpython-ba2cf078d2bd8705f61afda7081522981674882e.zip
cpython-ba2cf078d2bd8705f61afda7081522981674882e.tar.gz
cpython-ba2cf078d2bd8705f61afda7081522981674882e.tar.bz2
Properly compute array size even for --disable-unicode.
Diffstat (limited to 'Python')
-rw-r--r--Python/codecs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/codecs.c b/Python/codecs.c
index 9302a3d..ec0daf3 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)