Use the new Py_ARRAY_LENGTH macro

This commit is contained in:
Victor Stinner 2011-09-29 00:42:28 +02:00
parent b9dcffb51e
commit 639418812f
15 changed files with 26 additions and 28 deletions

View file

@ -1593,7 +1593,7 @@ test_long_numbits(PyObject *self)
{-0xfffffffL, 28, -1}};
int i;
for (i = 0; i < sizeof(testcases) / sizeof(struct triple); ++i) {
for (i = 0; i < Py_ARRAY_LENGTH(testcases); ++i) {
PyObject *plong = PyLong_FromLong(testcases[i].input);
size_t nbits = _PyLong_NumBits(plong);
int sign = _PyLong_Sign(plong);