diff options
author | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2005-10-23 18:50:36 (GMT) |
---|---|---|
committer | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2005-10-23 18:50:36 (GMT) |
commit | 2dfcef5c57f35af0e1ba200ba36508be8667001a (patch) | |
tree | 8986c1ffa7f1b365801808d853822919784e8cca | |
parent | 8b528b28f15a78c116fc90303194ad8b1476034d (diff) | |
download | cpython-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.
-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 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; |