summaryrefslogtreecommitdiffstats
path: root/Python/symtable.c
diff options
context:
space:
mode:
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>2005-10-23 18:50:36 (GMT)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>2005-10-23 18:50:36 (GMT)
commit2dfcef5c57f35af0e1ba200ba36508be8667001a (patch)
tree8986c1ffa7f1b365801808d853822919784e8cca /Python/symtable.c
parent8b528b28f15a78c116fc90303194ad8b1476034d (diff)
downloadcpython-2dfcef5c57f35af0e1ba200ba36508be8667001a.zip
cpython-2dfcef5c57f35af0e1ba200ba36508be8667001a.tar.gz
cpython-2dfcef5c57f35af0e1ba200ba36508be8667001a.tar.bz2
Fix check_unoptimized() function. The only optimized namespaces are
in function blocks. This elimiates spurious warnings about "import *" and related statements at the class level.
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 cbf0344..46efe4b 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -445,7 +445,7 @@ check_unoptimized(const PySTEntryObject* ste) {
char buf[300];
const char* trailer;
- if (ste->ste_type == ModuleBlock || !ste->ste_unoptimized
+ if (ste->ste_type != FunctionBlock || !ste->ste_unoptimized
|| !(ste->ste_free || ste->ste_child_free))
return 1;