summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-10-16 03:45:45 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-10-16 03:45:45 (GMT)
commit230b20684f6d10044d604bc88065692393037948 (patch)
tree252d777b8743aa3884daf112549e4fdf4275d117 /Python
parent294a9fcba67b95efc62c5461fcc6fe9a5a59c525 (diff)
downloadcpython-230b20684f6d10044d604bc88065692393037948.zip
cpython-230b20684f6d10044d604bc88065692393037948.tar.gz
cpython-230b20684f6d10044d604bc88065692393037948.tar.bz2
don't identify the toplevel namespace by name #9997
Diffstat (limited to 'Python')
-rw-r--r--Python/symtable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index f75b9c9..4a6c523 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -924,7 +924,7 @@ symtable_enter_block(struct symtable *st, identifier name, _Py_block_ty block,
st->st_cur = ste_new(st, name, block, ast, lineno, col_offset);
if (st->st_cur == NULL)
return 0;
- if (name == GET_IDENTIFIER(top))
+ if (block == ModuleBlock)
st->st_global = st->st_cur->ste_symbols;
if (prev) {
if (PyList_Append(prev->ste_children,