Commit cb0cdce8 authored by Amaury Forgeot d'Arc's avatar Amaury Forgeot d'Arc

Move variable declaration to the top of the block,

to let _json.c compile with Microsoft compilers.
parent 6ee80ec9
......@@ -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 */
if (next != end) {
PyObject *strchunk;
if (PyBuffer_FillInfo(&info, &buf[end], next - end, 1, 0) < 0) {
goto bail;
}
PyObject *strchunk = PyMemoryView_FromMemory(&info);
strchunk = PyMemoryView_FromMemory(&info);
if (strchunk == NULL) {
goto bail;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment