From: Christian Heimes Date: Sat, 3 Nov 2012 22:07:59 +0000 (+0100) Subject: Fix compilation on Windows X-Git-Tag: v3.2.4rc1~370 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6d26ade9205a5649431c7ea8aa1cb67b1caaf004;p=thirdparty%2FPython%2Fcpython.git Fix compilation on Windows --- diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index 164c1cf3ca36..7d5dbd0587b5 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;