]> granicus.if.org Git - python/commitdiff
Move variable declaration to the top of the block,
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>
Thu, 8 May 2008 20:56:43 +0000 (20:56 +0000)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>
Thu, 8 May 2008 20:56:43 +0000 (20:56 +0000)
to let _json.c compile with Microsoft compilers.

Modules/_json.c

index 39d39cb05a05e7b51c6d2fd1a6278559d95da537..890d27e9772e4e7042e4d98824b2de70a0869262 100644 (file)
@@ -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;
             }