Skip to content

Commit 956e5d1

Browse files
committed
Move declaration to avoid syntax error.
1 parent 0dc0faf commit 956e5d1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Objects/typeobject.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1856,6 +1856,7 @@ type_set_bases_world_stopped(PyTypeObject *type, PyObject *new_bases, PyTypeObje
18561856
{
18571857
assert(types_world_is_stopped());
18581858

1859+
Py_ssize_t n;
18591860
PyObject *old_bases = lookup_tp_bases(type);
18601861
assert(old_bases != NULL);
18611862
PyTypeObject *old_base = type->tp_base;
@@ -1899,7 +1900,7 @@ type_set_bases_world_stopped(PyTypeObject *type, PyObject *new_bases, PyTypeObje
18991900
return res;
19001901

19011902
undo:
1902-
Py_ssize_t n = PyList_GET_SIZE(temp);
1903+
n = PyList_GET_SIZE(temp);
19031904
for (Py_ssize_t i = n - 1; i >= 0; i--) {
19041905
PyTypeObject *cls;
19051906
PyObject *new_mro, *old_mro = NULL;

0 commit comments

Comments
 (0)