mirror of
https://github.com/python/cpython.git
synced 2025-07-10 04:45:36 +00:00
Use the new Py_ARRAY_LENGTH macro
This commit is contained in:
parent
b9dcffb51e
commit
639418812f
15 changed files with 26 additions and 28 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue