Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cb0cdce

Browse files
committed
Move variable declaration to the top of the block,
to let _json.c compile with Microsoft compilers.
1 parent 6ee80ec commit cb0cdce

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Modules/_json.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,11 @@ scanstring_str(PyObject *pystr, Py_ssize_t end, char *encoding, int strict)
256256
}
257257
/* Pick up this chunk if it's not zero length */
258258
if (next != end) {
259+
PyObject *strchunk;
259260
if (PyBuffer_FillInfo(&info, &buf[end], next - end, 1, 0) < 0) {
260261
goto bail;
261262
}
262-
PyObject *strchunk = PyMemoryView_FromMemory(&info);
263+
strchunk = PyMemoryView_FromMemory(&info);
263264
if (strchunk == NULL) {
264265
goto bail;
265266
}

0 commit comments

Comments
 (0)