summaryrefslogtreecommitdiffstats
path: root/Modules/_json.c
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-05-08 20:56:43 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-05-08 20:56:43 (GMT)
commitcb0cdce821d3153030e263a0b889efeb45e89d4d (patch)
tree44e9af55ac370e3e85ad3cfcc1efd2b7cd39fd01 /Modules/_json.c
parent6ee80ec92092fab393c836dc742740a2ef2ce83d (diff)
downloadcpython-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.c3
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;
}