diff options
author | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2005-10-23 18:50:36 +0000 |
---|---|---|
committer | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2005-10-23 18:50:36 +0000 |
commit | 53ade85f25dbe49ab70241e344c2e21b757ce088 (patch) | |
tree | 060645ae785fcf57a6015728344102023e626945 /Python/symtable.c | |
parent | fab779a4bfe05081ccb646ce23f6c53f66135e12 (diff) | |
download | cpython-53ade85f25dbe49ab70241e344c2e21b757ce088.tar.gz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/symtable.c b/Python/symtable.c index cbf0344644..46efe4b391 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; |