summaryrefslogtreecommitdiff
path: root/Python/symtable.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-10-16 03:45:45 +0000
committerBenjamin Peterson <benjamin@python.org>2010-10-16 03:45:45 +0000
commit75d40e99d8063ff7b7163e6ccbcf23a44848538b (patch)
treeed8cf20e4b88b13fde93aa1abe7e8be59015f950 /Python/symtable.c
parenta0097f9441d3b4626a01e5a827a4af80f4e4618b (diff)
downloadcpython-75d40e99d8063ff7b7163e6ccbcf23a44848538b.tar.gz
don't identify the toplevel namespace by name #9997
Diffstat (limited to 'Python/symtable.c')
-rw-r--r--Python/symtable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index f75b9c997f..4a6c52335b 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,