Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3205e74

Browse files
committed
Fix declaration-after-statement of d49f65ff4f3c
1 parent 7e13802 commit 3205e74

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

Modules/_testcapimodule.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1645,11 +1645,15 @@ test_long_numbits(PyObject *self)
16451645
int i;
16461646

16471647
for (i = 0; i < Py_ARRAY_LENGTH(testcases); ++i) {
1648-
PyObject *plong = PyLong_FromLong(testcases[i].input);
1648+
size_t nbits;
1649+
int sign;
1650+
PyObject *plong;
1651+
1652+
plong = PyLong_FromLong(testcases[i].input);
16491653
if (plong == NULL)
16501654
return NULL;
1651-
size_t nbits = _PyLong_NumBits(plong);
1652-
int sign = _PyLong_Sign(plong);
1655+
nbits = _PyLong_NumBits(plong);
1656+
sign = _PyLong_Sign(plong);
16531657

16541658
Py_DECREF(plong);
16551659
if (nbits != testcases[i].nbits)

0 commit comments

Comments
 (0)