From cb0cdce821d3153030e263a0b889efeb45e89d4d Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Thu, 8 May 2008 20:56:43 +0000 Subject: [PATCH] Move variable declaration to the top of the block, to let _json.c compile with Microsoft compilers. --- Modules/_json.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/_json.c b/Modules/_json.c index 39d39cb05a..890d27e977 100644 --- a/Modules/_json.c +++ b/Modules/_json.c @@ -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; } -- 2.40.0