]> granicus.if.org Git - python/commitdiff
Issue #8271: Fix compilation on Windows
authorVictor Stinner <victor.stinner@gmail.com>
Sun, 4 Nov 2012 22:59:15 +0000 (23:59 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Sun, 4 Nov 2012 22:59:15 +0000 (23:59 +0100)
Objects/stringlib/codecs.h

index e9a772c0bc98fc2e3555fcff596c70674d600d85..f353367013a61b4c776676c81bc1b2999b50f654 100644 (file)
@@ -93,13 +93,13 @@ STRINGLIB(utf8_decode)(const char **inptr, const char *end,
 
         if (ch < 0xE0) {
             /* \xC2\x80-\xDF\xBF -- 0080-07FF */
+            Py_UCS4 ch2;
             if (ch < 0xC2) {
                 /* invalid sequence
                 \x80-\xBF -- continuation byte
                 \xC0-\xC1 -- fake 0000-007F */
                 goto InvalidStart;
             }
-            Py_UCS4 ch2;
             if (end - s < 2) {
                 /* unexpected end of data: the caller will decide whether
                    it's an error or not */