]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix compilation on Windows
authorChristian Heimes <christian@cheimes.de>
Sat, 3 Nov 2012 22:07:59 +0000 (23:07 +0100)
committerChristian Heimes <christian@cheimes.de>
Sat, 3 Nov 2012 22:07:59 +0000 (23:07 +0100)
Objects/bytearrayobject.c

index 164c1cf3ca36de254fb97d112c06f6e8af893c83..7d5dbd0587b5abdacda887dc60f5e2db6146a6f6 100644 (file)
@@ -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;