Mercurial > cpython-lru_cache-weakref
diff Python/codecs.c @ 26331:60bd7af0324e legacy-trunk
Properly compute array size even for --disable-unicode.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Thu, 21 Nov 2002 23:53:25 +0000 |
| parents | 910fa739f4a4 |
| children | c163f95b300c |
line wrap: on
line diff
--- a/Python/codecs.c Thu Nov 21 23:52:35 2002 +0000 +++ b/Python/codecs.c Thu Nov 21 23:53:25 2002 +0000 @@ -822,7 +822,7 @@ _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)
