diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-05-17 00:38:22 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-05-17 00:38:22 (GMT) |
commit | e2135c615842183bfbc5733e423ad6c4577af0e6 (patch) | |
tree | 1c9176ff4e4251a211c2bcc39b5c36e9f02539c9 /Python/symtable.c | |
parent | 862b15e7d0402d3aabe224ca33e45f4e9aa6dd00 (diff) | |
download | cpython-e2135c615842183bfbc5733e423ad6c4577af0e6.zip cpython-e2135c615842183bfbc5733e423ad6c4577af0e6.tar.gz cpython-e2135c615842183bfbc5733e423ad6c4577af0e6.tar.bz2 |
move definition to top of block
Diffstat (limited to 'Python/symtable.c')
-rw-r--r-- | Python/symtable.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/symtable.c b/Python/symtable.c index e686d9e..48495f7 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -1236,13 +1236,14 @@ symtable_visit_stmt(struct symtable *st, stmt_ty s) 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)) { |