]> granicus.if.org Git - python/commitdiff
fix compilation on Windows
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 16 May 2013 20:17:17 +0000 (22:17 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 16 May 2013 20:17:17 +0000 (22:17 +0200)
Python/compile.c

index 65043e43965b86fbd75f0539ecf352d681fe7a4b..4fc75759260f6e4cdcb112b1a79e9da80d0cee23 100644 (file)
@@ -1360,10 +1360,11 @@ compiler_mod(struct compiler *c, mod_ty mod)
 static int
 get_ref_type(struct compiler *c, PyObject *name)
 {
+    int scope;
     if (c->u->u_scope_type == COMPILER_SCOPE_CLASS &&
         !PyUnicode_CompareWithASCIIString(name, "__class__"))
         return CELL;
-    int scope = PyST_GetScope(c->u->u_ste, name);
+    scope = PyST_GetScope(c->u->u_ste, name);
     if (scope == 0) {
         char buf[350];
         PyOS_snprintf(buf, sizeof(buf),