Move variable declaration to the top of the block,

to let _json.c compile with Microsoft compilers.
This commit is contained in:
Amaury Forgeot d'Arc 2008-05-08 20:56:43 +00:00
parent 6ee80ec920
commit cb0cdce821

View file

@ -256,10 +256,11 @@ scanstring_str(PyObject *pystr, Py_ssize_t end, char *encoding, int strict)
} }
/* Pick up this chunk if it's not zero length */ /* Pick up this chunk if it's not zero length */
if (next != end) { if (next != end) {
PyObject *strchunk;
if (PyBuffer_FillInfo(&info, &buf[end], next - end, 1, 0) < 0) { if (PyBuffer_FillInfo(&info, &buf[end], next - end, 1, 0) < 0) {
goto bail; goto bail;
} }
PyObject *strchunk = PyMemoryView_FromMemory(&info); strchunk = PyMemoryView_FromMemory(&info);
if (strchunk == NULL) { if (strchunk == NULL) {
goto bail; goto bail;
} }