summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2012-11-03 22:08:18 (GMT)
committerChristian Heimes <christian@cheimes.de>2012-11-03 22:08:18 (GMT)
commitd081fbba58882adc06a07f820ecf555a992e8966 (patch)
tree07bd645bb44bf580b4e32f3e6e66f37f3f50914b
parent309b0432377f2f7159fa4f407859db9d6d5fdc39 (diff)
parent6d26ade9205a5649431c7ea8aa1cb67b1caaf004 (diff)
downloadcpython-d081fbba58882adc06a07f820ecf555a992e8966.zip
cpython-d081fbba58882adc06a07f820ecf555a992e8966.tar.gz
cpython-d081fbba58882adc06a07f820ecf555a992e8966.tar.bz2
Fix compilation on Windows
-rw-r--r--Objects/bytearrayobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
index 6e95606..9f1cf0a 100644
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -589,6 +589,7 @@ bytearray_ass_subscript(PyByteArrayObject *self, PyObject *index, PyObject *valu
needed = 0;
}
else if (values == (PyObject *)self || !PyByteArray_Check(values)) {
+ int err;
if (PyNumber_Check(values) || PyUnicode_Check(values)) {
PyErr_SetString(PyExc_TypeError,
"can assign only bytes, buffers, or iterables "
@@ -596,7 +597,6 @@ bytearray_ass_subscript(PyByteArrayObject *self, PyObject *index, PyObject *valu
return -1;
}
/* Make a copy and call this function recursively */
- int err;
values = PyByteArray_FromObject(values);
if (values == NULL)
return -1;