diff options
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 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) |