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

Skip to content

Commit d081fbb

Browse files
committed
Fix compilation on Windows
2 parents 309b043 + 6d26ade commit d081fbb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/bytearrayobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,14 +589,14 @@ bytearray_ass_subscript(PyByteArrayObject *self, PyObject *index, PyObject *valu
589589
needed = 0;
590590
}
591591
else if (values == (PyObject *)self || !PyByteArray_Check(values)) {
592+
int err;
592593
if (PyNumber_Check(values) || PyUnicode_Check(values)) {
593594
PyErr_SetString(PyExc_TypeError,
594595
"can assign only bytes, buffers, or iterables "
595596
"of ints in range(0, 256)");
596597
return -1;
597598
}
598599
/* Make a copy and call this function recursively */
599-
int err;
600600
values = PyByteArray_FromObject(values);
601601
if (values == NULL)
602602
return -1;

0 commit comments

Comments
 (0)