mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
Move variable declaration to the top of the block,
to let _json.c compile with Microsoft compilers.
This commit is contained in:
parent
6ee80ec920
commit
cb0cdce821
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue