diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-05-08 20:56:43 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-05-08 20:56:43 (GMT) |
commit | cb0cdce821d3153030e263a0b889efeb45e89d4d (patch) | |
tree | 44e9af55ac370e3e85ad3cfcc1efd2b7cd39fd01 /Modules/_json.c | |
parent | 6ee80ec92092fab393c836dc742740a2ef2ce83d (diff) | |
download | cpython-cb0cdce821d3153030e263a0b889efeb45e89d4d.zip cpython-cb0cdce821d3153030e263a0b889efeb45e89d4d.tar.gz cpython-cb0cdce821d3153030e263a0b889efeb45e89d4d.tar.bz2 |
Move variable declaration to the top of the block,
to let _json.c compile with Microsoft compilers.
Diffstat (limited to 'Modules/_json.c')
-rw-r--r-- | Modules/_json.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/_json.c b/Modules/_json.c index 39d39cb..890d27e 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; } |