diff Python/symtable.c @ 83803:86783c4fd528 3.3

move definition to top of block
author Benjamin Peterson <benjamin@python.org>
date Thu, 16 May 2013 19:38:22 -0500
parents cd9141a4f999
children c3df31cbcd0a 8bcdd2343bf5
line wrap: on
line diff
--- a/Python/symtable.c	Thu May 16 22:57:02 2013 +0100
+++ b/Python/symtable.c	Thu May 16 19:38:22 2013 -0500
@@ -1236,13 +1236,14 @@
         asdl_seq *seq = s->v.Global.names;
         for (i = 0; i < asdl_seq_LEN(seq); i++) {
             identifier name = (identifier)asdl_seq_GET(seq, i);
+            long cur;
             if (st->st_cur->ste_type == ClassBlock &&
                 !PyUnicode_CompareWithASCIIString(name, "__class__")) {
                 PyErr_SetString(PyExc_SyntaxError, "cannot make __class__ global");
                 PyErr_SyntaxLocationEx(st->st_filename, s->lineno, s->col_offset);
                 return 0;
             }
-            long cur = symtable_lookup(st, name);
+            cur = symtable_lookup(st, name);
             if (cur < 0)
                 VISIT_QUIT(st, 0);
             if (cur & (DEF_LOCAL | USE)) {