From: Amaury Forgeot d'Arc Date: Thu, 8 May 2008 20:56:43 +0000 (+0000) Subject: Move variable declaration to the top of the block, X-Git-Tag: v3.0b1~438 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cb0cdce821d3153030e263a0b889efeb45e89d4d;p=python Move variable declaration to the top of the block, to let _json.c compile with Microsoft compilers. --- 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; }